Below is one part of code, but my question is which type is file object ifstream f100?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
float P100(){
int a=1;
ifstream f100;
T37 z37;
f100.open("37337.dat",ios::in|ios::binary);
while(1){
f100.read((char*)&z37,sizeof(z37));
if (f100.eof()) break;
a = ++a;
cout << "---------------------" << endl;
cout << "sesta: " << z37.six << endl;
cout << "cetvrta: " << z37.four << endl;
cout << "treca: " << z37.three << endl;
cout << "peta: " << z37.five << endl;
}
f100.close();
return a++;
};
|
Last edited on
That's what I was thinking about, but aren't file objects declared in class fstream?
There are multiple stream classes, ifstream, ofstream, stringstream, fstream, ostream, istream each of these classes are types.
Thanks guys! Helped a lot!