Edit: solved...using the same ifstream for multiple files is apparently not a good idea.
I just bought a new laptop, and having transfered my C++ project to the new computer, I'm suddenly having an issue with reading text files from Code::Blocks...I'm not sure why.
The old laptop ran a 32 bit OS whereas the new one is 64 bit. I don't know if that would affect anything.
Here's the section of code that is no longer working:
ifstream myfile;
//edit: a different file is read here, in exactly the same manner as below
//when I comment it out, the following section works as it's meant to...
//what am I doing wrong that they won't work successively
myfile.open("version.txt");
if (myfile.is_open()) {
out("This message displays...");
//OK so apparently 'eofbit' is thrown here...but the file has content in it?
while (myfile.good()) {
out("This message doesn't, when it should...");
getline(myfile,version_info);
}
myfile.close();
}
edit: 'out' is just a custom script to display a message, btw.