View Single Post
Old 12-09-2004, 04:25 AM   #4 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Creating and reading files is simple enough. The code below assumes the file is in the project folder.
You will need to add this if the file is in another folder:
"c:/windows/temp/whatever/...."
Code:
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;
}
But opening windows and loading pictures is a win32 issue. I don't cover api's. Besides, that is offtopic in this forum, since here we only deal with standard C and C++.
__________________
Valmont is offline   Reply With Quote