I have a file over 100 Kb long. I want to perform operations on successive batches of 256 characters.
int fs=0;
char ss[32556];
ifstream nm,nm1;
nm1.open("as86.txt");
if(nm1.is_open())
{
nm1.seekg(0, ios::end );
fs = nm1.tellg();
}
nm1.close();
nm.open("as86.txt");
nm.read(ss,fs+1);
nm.close();
cout << endl << fs << endl;
ofstream mn;
mn.open("as86.txt");
for(int jm=256;jm<fs;jm++){mn << ss[jm];}
mn.close();
Now i've been reading it using arrays and writing them from the 256th charcter back into the file.I guess arrays can't hold that many values and my text file gets corrupted.
Is there any command in the stream classes to remove the first 256 characters from a file or better array implementation that i can use ?