I am trying to ignore values from an input file. I used the command
cin.ignore()
nut when I go to try the program I have to keep pushing enter and the message shows up one letter at a time, and it still isn't ignoring the value.
I am trying to ignore values from an input file. I used the command
cin.ignore()
nut when I go to try the program I have to keep pushing enter and the message shows up one letter at a time, and it still isn't ignoring the value.
Try replacing "cin" with the name of your ifstream object, eg:
Code:std::ifstream in("myfile.txt"); in.ignore();//ignore first char...
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared