Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Help

Name: Anonymous 2009-05-25 2:35

Dearest /prog/, I beg you to aid me in my venture of C++.

My question concerns fstream. How is fstream different from ifstream and ofstream together? I thought it was just a combination of both, but when i run my code after changing a former ifstream into an fstream *without* changing anything else, it doesn't give me the same results. What is happening?

code would look something like:
ifstream infile;
ifstream.open("test.txt", ios::binary);
infile.seekg(0xCB);
char[4] c;
for(int i = 0; i < 4; i++) {
    c[i] = (char)infile.get();
}

But when I replace the ifstream with fstream, i get different results.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List