Hi,
I have a file 31oct2003.xls. I want to make a copy of this file with a new name, say:2nov2003.xl s. But my program is crashing at hte line
char* buffer = new char[size];
saying could not allocate memory.
Any solution to this problem?
---------------------
ifstream oldfile(31oct20 03.xls, ios::in|ios::bi nary|ios::ate);
long size = oldfile.tellg() ;
char* buffer = new char[size];
oldfile.seekg (0, ios::beg);
oldfile.read(bu ffer,size);
ofstream weekrep(stime_1 , ios::binary||io s::out);
weekrep.write(b uffer,size);
-------------
Regards,
Vasanth
I have a file 31oct2003.xls. I want to make a copy of this file with a new name, say:2nov2003.xl s. But my program is crashing at hte line
char* buffer = new char[size];
saying could not allocate memory.
Any solution to this problem?
---------------------
ifstream oldfile(31oct20 03.xls, ios::in|ios::bi nary|ios::ate);
long size = oldfile.tellg() ;
char* buffer = new char[size];
oldfile.seekg (0, ios::beg);
oldfile.read(bu ffer,size);
ofstream weekrep(stime_1 , ios::binary||io s::out);
weekrep.write(b uffer,size);
-------------
Regards,
Vasanth
Comment