QUICK C PROGRAM QUESTION

Kenji4861

Banned
Jan 28, 2001
2,821
0
0
Is there a way to write data into a file in bit level?

making the fwrite, write a bit at a time instead of byte at a time.
 

Skyclad1uhm1

Lifer
Aug 10, 2001
11,383
87
91
Just treat it as an array.

Edit: Forgot to do your homework in time? :)

Edit 2: Tsk, nasty to change the original mail, then the replies aren't right anymore :(
 

GermyBoy

Banned
Jun 5, 2001
3,524
0
0
Yes, use an fseek () command. Also, be sure to open the file in binary, and treat like arrays (all but binary previously explained, wanted to help out and summarize for you).