View Single Post
  #2 (permalink)  
Old March 23rd, 2005, 07:40 PM
Silent_Coder Silent_Coder is offline
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

to open a file you would do this.

#include <iostream>
#include <fstream>

int main(){

ifstream fin;
ofstream fout;
fin("file.whatever"): /* to open for input */
fin.close();
fout("file.whatever"); /* open for output */
fout << "line written to file"";
fout.close();
return 0;
}



Reply With Quote