it doesnt matter if i set y to 0 or not , the same thing keeps happening.....

01-08-2005

Shakti

Ok ill be happy with this for now :) , but next time try to indent code, its much easier to read.

Now on to your problem; the problem is that cin leaves the trailing newline character in the buffer. This means that the program basicly skips the cin.get call because cin.get() gets the newline already in the buffer from previous calls to cin >> [whatever variable you have here]. to fix this add this code after every cin >> [whatever]; : cin.ignore();

01-08-2005

Blips

Ah, thank you that did it. I had forgoten all about the cin.ignore() function :D

now back to the tutorials.

01-08-2005

Scribbler

The problem here is cin.ignore() with no arguments simply ignores the next character in the input stream. While usually the only item left is the newline from the previous input, sometimes there can be more than one character in the input stream. Usually when cin is used to input a variable, but the user input was delimited with whitespaces and extra chars.

Using while ( cin.get() != '\n' ); will flush all characters up to the newline out of the input buffer.

01-10-2005

GamingMarvel

im not sure the header file but where your cin.get() is try a getch().