Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 24th, 2005, 2:59 AM   #1
Princeck
Newbie
 
Join Date: Feb 2005
Posts: 3
Rep Power: 0 Princeck is on a distinguished road
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.
Princeck is offline   Reply With Quote
Old Feb 24th, 2005, 6:37 AM   #2
lepricaun
Hobbyist Programmer
 
lepricaun's Avatar
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 111
Rep Power: 5 lepricaun is on a distinguished road
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
lepricaun is offline   Reply With Quote
Old Feb 24th, 2005, 3:09 PM   #3
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
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
kurifu is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC