| | |
help me wth file
![]() |
•
•
Join Date: Jul 2004
Posts: 2
Reputation:
Solved Threads: 0
hi
I have problem with file. The problem is I have to compare two file 1)master file and 2)transaction file. both have accno, amount,id and code(d-deposit,w-withdraw). the accno is in char[10] ,amount double, id integer and code character[1].
my problem is how to compare accno from master file with accno from transaction file,because both acc no is character and if acc no(master file) equal acc no(transaction file) i have to copy the accno(master file) and the rest(amount,id) to new master file.all file is in sequential file.
can anyone help me
asap
tq :rolleyes:
I have problem with file. The problem is I have to compare two file 1)master file and 2)transaction file. both have accno, amount,id and code(d-deposit,w-withdraw). the accno is in char[10] ,amount double, id integer and code character[1].
my problem is how to compare accno from master file with accno from transaction file,because both acc no is character and if acc no(master file) equal acc no(transaction file) i have to copy the accno(master file) and the rest(amount,id) to new master file.all file is in sequential file.
can anyone help me
asap
tq :rolleyes:
•
•
Join Date: Mar 2004
Posts: 1,620
Reputation:
Solved Threads: 51
Hello,
This should be pretty straightforward.
First, you need to create two data structures in memory. They will be the same structures, but one will be the master file data, and the other will be the transaction file.
Couple things for you to think about:
* Array or linked list?
* Look up the string compare function to see how to compare account numbers
* How will you handle bad data in the transaction file?
* When the program is done, write out the memory to a flat file.
Go ahead and code this out. If you need more help, please show us some psuedo code, and let us help. We cannot go too much further in assistance, as it would violate DaniWeb homework policy.
Christian
This should be pretty straightforward.
First, you need to create two data structures in memory. They will be the same structures, but one will be the master file data, and the other will be the transaction file.
Couple things for you to think about:
* Array or linked list?
* Look up the string compare function to see how to compare account numbers
* How will you handle bad data in the transaction file?
* When the program is done, write out the memory to a flat file.
Go ahead and code this out. If you need more help, please show us some psuedo code, and let us help. We cannot go too much further in assistance, as it would violate DaniWeb homework policy.
Christian
![]() |
Similar Threads
- News Story: File Sharer turns down donations (Site Layout and Usability)
- News Story: ISP spanks file-sharers with bloody big boot (PCI and Add-In Cards)
- End of file function + Array (C++)
- News Story: UK ISPs agree to throttle illegal music file-sharers (Mac Rumors and Reports)
- News Story: Microsoft Publishes File Format Specs, 'Open Connections' (Windows Software)
- News Story: Court Ruling Keeps File-Sharing Apps Alive (Upcoming News Stories)
- View an xml file in ie (RSS, Web Services and SOAP)
- 81TB File Server (Networking Hardware Configuration)
Other Threads in the C Forum
- Previous Thread: Reversive Array/Integer
- Next Thread: Locking the mouse button down
| Thread Tools | Search this Thread |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators intmain() iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling segmentationfault send shape socketprograming socketprogramming stack standard strchr string suggestions systemcall test unix urboc user variable voidmain() wab win32api windows.h






