so would this be the entire code for it to work?
Code:
#include <fstream>
#include <iostream>
int main(int argc, char *argv[])
{
ofstream createOpenTest("ABCDEFGHIJ LKMNO PQRST UVWXY ZABCD EFGHI.state");
int a(0);
createOpenTest<<5;
createOpenTest.close();
ifstream readOpenTest("ABCDEFGHIJ LKMNO PQRST UVWXY ZABCD EFGHI.state");
readOpenTest>>a;
readOpenTest.close();
cout<<a<<endl;
return 0;
} i don't understand the following parts:
what is "createOpentest"? and also, why is there the name of the file in the brackets? i was trying to get all the files which end in .state?
Code:
ofstream createOpenTest("ABCDEFGHIJ LKMNO PQRST UVWXY ZABCD EFGHI.state"); i've got the same questions for the following code.
Code:
ifstream readOpenTest("ABCDEFGHIJ LKMNO PQRST UVWXY ZABCD EFGHI.state"); basically, could you just explain your code briefly.
thx in adv.