View Single Post
Old 12-13-2004, 06:52 PM   #8 (permalink)
Androto
Mac Os X User(I hate win)
 
Join Date: Oct 2004
Posts: 138
Androto is on a distinguished road
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.
Androto is offline   Reply With Quote