Try to copy your file ( say: "original.txt" ) one caracter at a time to another file ( say: "copy.txt" )
while copying the original file to "copy.txt" if some caracters from the original file are equivalent to the caracter that you want to erase,copy the space caracter instead to "copy.txt".
that may not work. the character are 'bits'. all 0's and 1's. what i did do was instead of copying to a diff file like i was, i simply put them in a buffer and started reading from the last place i left off. then overwrote the buffer. this works.
but let me know if you come up with another way
Ok i have found something !
I'm not sure if this is going to work in your example since you are using "bit caracters" but it should work with "text files".
Copy your file to another one.While copying the file if some caracters matchs the one that you want to erase,do nothing.
nope won't work. tried that. the 0's and 1's are random. plus i have to have data integrity because i have to convert to decimal once conditions have been meet concerning whether or not the bit is 1 or 0.
i used this:
while (finAllBit>>b)
{
bits[a]=b;
a++;
if(a>304)//only want 304 at a time
{
cout<<bits[5]<<endl;
a=1;//this resets the index and overwrites old with new
}
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.