0

hey all, i am programmin in c++ (just so we are all on the same page lol) and using Borland compiler 3.

ok here's my problem, i know how to open a file and save variables to it in order to save them for future program reference but i can't get it to load more than one variable from the file, i need to be able to load as many variables as my program needs. i have searched long and hard for this but all my searches on the topic don't talk about the specific problem that i am haveing, it only tells me time and time again that fstream is used for i/o file handeling and things like that. can anyone here help me?

thanks to all those who help and those who try,
-evilsilver

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by Ancient Dragon
0

post the program that saves the variables. Were the variables written in their ascii format or binary format? If ascii, did you put one or more spaces between them? of just jam them all up together. Open the file in Notepad or some other text editor -- can you distinguish the variable values?

If you want to read back an unknown number of integers (or other data type), read them one at a time and save them in a std::vector.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.