Extract/Include bites in binary file

S

Senger

Hi.

How I can Include or Extract bites in a binary file??
I'm tring to use a fopen method, but without success.

Do you have any idea???

Thanks!!!
 
S

Senger

The better way to say: Include or Remove bytes in a binary file...
What functions I need to use, and how to implementing?

Thanks!!
 
V

Victor Bazarov

Senger said:
How I can Include or Extract bites in a binary file??
I'm tring to use a fopen method, but without success.

Do you have any idea???

Your question is addressed in the FAQ 5.8. Please take a read.

V
 
K

Karl Heinz Buchegger

Senger said:
The better way to say: Include or Remove bytes in a binary file...
What functions I need to use, and how to implementing?

Thanks!!

open the file for reading
open a second file for writing

while( ...
read from the first file
decide if you need some modifications on what you read
write the new content to the file
}

close both files
delete the first file
rename the second file to have the name of the first file

done!
 
V

Victor Bazarov

Senger said:
The better way to say: Include or Remove bytes in a binary file...
What functions I need to use, and how to implementing?

'fopen', 'fread', 'fwrite', 'fclose'. As to how, read the books.
They explain it all much better than anybody can in a newsgroup post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top