¡@

Home 

c++ Programming Glossary: instream

Why is this cin reading jammed?

http://stackoverflow.com/questions/478258/why-is-this-cin-reading-jammed

name of dictionary file endl getline cin wordFile ifstream inStream wordFile.data if inStream.is_open cerr cannot open wordFile.. getline cin wordFile ifstream inStream wordFile.data if inStream.is_open cerr cannot open wordFile endl exit 1 vector WordInfo.. 1 vector WordInfo wordInfoVector WordInfo aword while inStream aword aword synonyms wordInfoVector.push_back aword inStream.clear..

Why is iostream::eof inside a loop condition considered wrong?

http://stackoverflow.com/questions/5605125/why-is-iostreameof-inside-a-loop-condition-considered-wrong

then next read will be at the end of the stream while inStream.eof int data yay not end of stream yet now read ... inStream.. int data yay not end of stream yet now read ... inStream data oh crap now we read the end and only now the eof bit will.. with now uninitialized data Against this int data while inStream data when we land here we can be sure that the read was successful...