Quote:
Originally posted by joe_bruin
i would spend alot more time diagnosing a problem before you blame the compiler.
your problem is that this line:
cin >> responce;
only reads one char from the input, but the user entered 2 chars (example: 'y\n'). it is leaving the '\n' in the read buffer. the "getline(cin,date);" in the next loop is reading this '\n'. so, either absorb this newline char by another cin, or use a function more suited to reading the input you're expecting.
btw, it's spelled 'response'.
|
I have no idea where you got that from, ther user does not at any point enter '\n' in fact there is no '\n' I used a forward slash because I knew that a backslash would be an escape charater. The user inputs either y or n but never '\n'.
As for the spelling mistake thats a minor problem.
BTW. I have had this problem before a number of times with GCC without a using 'cin << varname;' and that is why I'm think the problem
might be the compiler itself