View Single Post
Staro 13.02.2009., 11:46   #3
Dancho
Registered User
 
Datum registracije: Jun 2007
Lokacija: cro
Postovi: 42
evo zapocni s ovim snipetom:


Code:
#include <iostream>
#include <string>
#include <conio.h> // not standard header
using namespace std;

int main()
{
	string word="";
	unsigned int c=0;
	
	cout<<"Unesi rijec:";
	while(true)
	{
		c=_getch();
		if(c==0x0D)
			break;
		if( (c<'a' && c>'z') || (c<'A' && c>'Z') )
			continue;
		else
		{
			word+=c;
			_putch('*');
		}
	}
	
	cout<<endl;

	cout<<"Upisana rijec je:"<<word<<endl;

	return 0;
}
Dancho je offline   Reply With Quote