seshreddy
May 1st, 2003, 10:40 PM
Hi
in my application i want to read data from file and incase file doesnot exist then new file has to be created and some default values r written to file.
my doubt is when i use
#include<iostream.h>
#include<fstream.h>
it is working properly.
but now i changed to
#include<iostream>
#include<fstream>
using namespace std;
and it is not creating file when doesnot exist.
the file modes that i have taken are
fstream file;
file.open("cache.txt",ios::in | ios::ate | ios::out);
can any one try this out..
bye
seshu
in my application i want to read data from file and incase file doesnot exist then new file has to be created and some default values r written to file.
my doubt is when i use
#include<iostream.h>
#include<fstream.h>
it is working properly.
but now i changed to
#include<iostream>
#include<fstream>
using namespace std;
and it is not creating file when doesnot exist.
the file modes that i have taken are
fstream file;
file.open("cache.txt",ios::in | ios::ate | ios::out);
can any one try this out..
bye
seshu