![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2005
Posts: 3
Rep Power: 0
![]() |
C files and structures
hey,
I am new to C programming, Actually i have one text file, which has to be read records from starting to end.while reading records, i will check for few fields and if necessary i will insert some records in the middle of the record list.this is my requirement. Can i go for C structure? if so could you pls give me sample code. Also pls tell me which mode should i have to open and write the records. w+b or a+b? could you pls suggest me? ambichan. Last edited by Princeck; Feb 24th, 2005 at 4:28 AM. Reason: its urgent. |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Aug 2004
Location: The Netherlands
Posts: 111
Rep Power: 5
![]() |
if you are new too C, then why start with such a complicated task?
i'm not saying it is way too difficult, but if i were you i would learn C some more and write some more simple programs before i'd start on this program.
__________________
http://www.white-scorpion.nl |
|
|
|
|
|
#3 |
|
Expert Programmer
|
File structures is not something one can just explain in a simple little posting here, your best bet would be to get a book, or use google to look up reading and writing to text and than binary files.
Binary files are particularly complex too since you have to take MANY factors into the structure of the data on the file such as: Byte Ordering (Big-Endian vs. Little-Endian), and structure padding (size of padding when writing/reading entire structures from file). This is something you will likely need to do a fair amount of reading on to understand at a competant level.
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|