Can't Input an int....
For some reason, I am having a really wierd problem with a program... It wont let me input an integer. Its part of a function in a somewhat simple battleship game. Here is the start of that function:
It compiles fine, but when I put in that number it crashes... Any sugestions would be great.
char vert, ship;
cout<<"Chose horizontal target (1-10): ";
Post your whole code, what you have there seems to be fine unless you are entering in a character instead of a number.
I'm going to try revising the whole thing first. A bunch of parts got quite messy, because at the end I was getting a bit overwhelmed. If I still have this problem afterwards I'll post the whole thing.