View Single Post
  #2 (permalink)  
Old April 5th, 2006, 03:10 AM
C@uark C@uark is offline
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C@uark
Default

# include the fstream header file,and create an instance of an fstream object i.e

#include <fstream>
using namespace std;

int main () {

  fstream filestr;

  filestr.open ("test.txt", fstream::in | fstream::out | fstream::app); // open a file with mode

  // >> i/o operations here <<

  filestr.close();

  return 0;
}
Reply With Quote