V
vasanth kumar
Hi,
I have a file 31oct2003.xls. I want to make a copy of this file with a new name, say:2nov2003.xls. 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(31oct2003.xls, ios::in|ios::binary|ios::ate);
long size = oldfile.tellg();
char* buffer = new char[size];
oldfile.seekg (0, ios::beg);
oldfile.read(buffer,size);
ofstream weekrep(stime_1, ios::binary||ios:
ut);
weekrep.write(buffer,size);
I have a file 31oct2003.xls. I want to make a copy of this file with a new name, say:2nov2003.xls. 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(31oct2003.xls, ios::in|ios::binary|ios::ate);
long size = oldfile.tellg();
char* buffer = new char[size];
oldfile.seekg (0, ios::beg);
oldfile.read(buffer,size);
ofstream weekrep(stime_1, ios::binary||ios:
weekrep.write(buffer,size);