View Single Post
Old 12-11-2004, 05:50 PM   #6 (permalink)
Androto
Mac Os X User(I hate win)
 
Join Date: Oct 2004
Posts: 138
Androto is on a distinguished road
Quote:
Originally Posted by Valmont
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++.
if i'm using os x will that change anything?


also, how do i get this code to work? what libraries do i have to include?

Last edited by Androto; 12-11-2004 at 06:52 PM.
Androto is offline   Reply With Quote