Hay!
So im trying to create a simple text-based game with c++, i have got verry good results so far, but i dont understand how to do the yes/no thingy
im trying to do this:
char yesorno;
cout<< "blahblahblah, (Y/N)";
cin>> yesorno;
if(yesorno == "n")
{
do
//blahblahblah
}
until(yesorno == "y")
And when i try to compile it sais:
ISO c++ forbids comparison between pointer and integer
can someone tell me how to fix this?
Last edited on
Characters are placed in single quotes. if( yesorno == 'n' )
omg thank you THANK YOU!!!!!
Or you could use strings...
this thread whent over to hear: http://www.cplusplus.com/forum/beginner/14176/