View Single Post
Old 10-05-2007, 07:32 PM   #2 (permalink)
sam_1710
Alpha Geek
 
sam_1710's Avatar
 
Join Date: May 2006
Posts: 755
Default Re: File handling using GCC/G++

u forgot to give namespace buddy!!!
this code will compile..
Code:
#include<fstream>
#include<iostream>
using namespace std;
int main()
{
ofstream f;
f.open("1.txt");
f.put(65);
std::cout<<"Inserted";
f.close();
return 1;
}
sam_1710 is offline