Hi im trying to make a null cipher program and am trying to get some initial testing done. first im trying to see if i will be able to get the specific character i want while typing.
string c ;
c = cin.get() ;
while (!cin.eof()) // as long as ur typing
{
cout << c;
c = cin.get() ;
}
I have this so far to just print out whatever i type. But whenever i attempt to printout the second, third or whatever number letter of what i type it doesn't print out anything.
for example : cout << c[2]; or cout << c[3]; will give me blanks.
If i attempt to printout the first letter it just prints out the same thing i typed in.
i think it has something to do with the while loop. i feel like im missing something very simple... any input is appreciated!