Hi
Im using a switch case for menu options.In case 1 im just printing the values of a couple varibles.I put in the getline() but it seems to be by passed all together.
the varible flashs up on the screen as it should with out the getline().
if i use system("pause") within the switch case it stops the screen so i can make sure the vars are returning the correct values.Also if i put the getline() outside the switch case...
..i know the problem aint exactly the end of the world just curious whats not adding up,
regards C
Code:switch(x){ case 1: playerStats( playerName, gold, playerTea ,playerFood,playerSpices, playerLoc);//just cout's stats cin.get(); break; case 2: //sell function break; case 3: //change location break; case 4: return 0; break; default: cout<<"YoU bRoKe ThE CoMpUtEr!!!"<<endl; cin.get(); return 0; break; }



LinkBack URL
About LinkBacks


