![]() |
| | #1 |
| Registered User Join Date: Jun 2003
Posts: 51
| 1)What type of viarible should i use to store it as binary? 2)May i know what is this n how to use this code n how to pass value between buffer (copy all contents to another buffer) Code: *buffer 4)How to read/write binary file? Please explain in more details ...[FAQ section just covered the text file] 5)How to determine how much data is to be written? Code: fwrite(writer[1], sizeof(int), 4, *level_1) I'm not really understand this coding so i'm asking in question #3. Correct me if i did something wrong in the coding.... 6)n please provide more information about working with binary files thanks... |
| megablue is offline | |
| | #2 |
| +++ OK NO CARRIER Join Date: Oct 2001
Posts: 10,262
| Binary files are just like text files, except you open with 'b' on them. (There is little difference between the two, other than how the newline character is written. That and you can seek correctly, where you can't in text files (because of said newline).) Quzah.
__________________ Hundreds of thousands of dipshits can't be wrong. Are you up for the suck? |
| quzah is offline | |
| | #3 | |
| Been here, done that. Join Date: May 2003
Posts: 1,036
| Re: How to store n write binary file? You really need to ask better questions.... Quote:
__________________ There are only 10 types of people in the world -- those that use binary, and those that don't | |
| WaltP is offline | |
| | #4 |
| Registered User Join Date: Jun 2003
Posts: 51
| WaltP sorry for my broken english.... I'm now getting clearer image on binary.... i'm feeling thankful for your reply based on 1) How can i read a file in "rb". Can i get this stuff "10010010" and then store each byte(8bits) of the data in a array[8]? Will the array contents look like this: array[1] = '1' array[2] = '0' ..... array[8] = '0' 5) i have to make a correction on this... Actually i'm wish to know the paremeters for fwrite & fread... |
| megablue is offline | |
| | #5 | |
| Been here, done that. Join Date: May 2003
Posts: 1,036
| Quote:
__________________ There are only 10 types of people in the world -- those that use binary, and those that don't | |
| WaltP is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Random acces write to a binary file | Opariti | C Programming | 2 | 10-28-2008 06:05 AM |
| opening empty file causes access violation | trevordunstan | C Programming | 10 | 10-21-2008 11:19 PM |
| help with text input | Alphawaves | C Programming | 8 | 04-08-2007 04:54 PM |
| simulate Grep command in Unix using C | laxmi | C Programming | 6 | 05-10-2002 04:10 PM |
| Need a suggestion on a school project.. | Screwz Luse | C Programming | 5 | 11-27-2001 02:58 AM |