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;
}