I m using the file handling functions of c++ namely
file.read() and copy.write() to read and write a 800 kb file on dsk6713.(the FID.read and FID.write functions,where FID is any variable like copy,file, etc)
But the simulator takes almost 5 minutes to do so.I guess this is an not an optimized way to read and write data from file.
PLZ SUGGEST THE EFFICIENT WAY OF READING AND WRITING DATA FROM FILE THAT WUD DO THE JOB IN REAL TIME(In fraction of seconds)
Here is my code.THE CODE IS EXECUTING PERFECTLY and there are no errors or warning.Problem is the time required to execute the code.Please help me
----------------------------------------
#include<stdio.h>
#include<iostream.h>
#include<fstream.h>
int main(void)
{char *m; //pointer to buffer
fstream file,copy;
file.open("t11.bin",ios::in|ios::binary);
copy.open("t11copy.bin",ios::out|ios::binary);
file.seekg(0,ios::end);
long size=file.tellg(); //get size of file
file.seekg(0,ios::beg);
cout<<size<<endl;
m=new char[size];
file.read(m,size);
copy.write(m,size);
file.close();
copy.close();
while(1);
}