| | |
Need Help in Reading characters from a text file
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
It's probably to do with the fact that your while loop is reading until EOF is set - in C++ this is the wrong way to do it, because your program will crash reading past the end of openfile (which is actually a stream, not a file). instead, use
while (openfile) which will continue as long as there is data in the stream. •
•
Join Date: Apr 2006
Posts: 11
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by WolfPack
What is the error message? What is line number 6? We can't go on counting you know...When you say execute do you mean compiling or running the program?
C++ Syntax (Toggle Plain Text)
**************************************************** Please wait... The following file tolldata.txt has been found. **************************************************** Error - Invalid or miss match Station ID record. Please refer to line 6 of tolldata.txt text file. Press any key to continue . . .
•
•
•
•
Originally Posted by tuannie
I mean compiling it, this is what I get:
C++ Syntax (Toggle Plain Text)
**************************************************** Please wait... The following file tolldata.txt has been found. **************************************************** Error - Invalid or miss match Station ID record. Please refer to line 6 of tolldata.txt text file. Press any key to continue . . .
バルサミコ酢やっぱいらへんで
![]() |
Similar Threads
- problems with reading random access line from a file (C++)
- C++ Reading from a text file (C++)
- Help Please, how do i read from text file into array? (Visual Basic 4 / 5 / 6)
- Reading in a text file string is not complete (Pascal and Delphi)
Other Threads in the C++ Forum
- Previous Thread: Function pointers inside classes
- Next Thread: "already defined" error
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






