User | Post |
HyperLamer
Posts: 7403/8210 |
Or use good ol' fopen and fseek. |
beneficii
Posts: 531/567 |
Originally posted by firemaker In C++ if you have opened a file in ios::binary how do you jump to the end of the file so that you can manipulate it from the end? Also When trying to decompress this file how do you get your functions to apply to te file?
It may be easier to just load the whole file into memory and work with it directly then save it. That's what I do. The seekg statements, etc., tend to be somewhat stringent, like once you've gone to a point in the file, you can't go back, etc. Do you understand what I'm saying?
You just malloc a variable and then load the file's contents into it. When you're done processing it just save it back. |
Eponick
Posts: 33/37 |
To jump to the end of the file try:
file.seekg(0, ios::end);
|
firemaker
Posts: 243/247 |
In C++ if you have opened a file in ios::binary how do you jump to the end of the file so that you can manipulate it from the end? Also When trying to decompress this file how do you get your functions to apply to te file? |