![]() |
|
#1
|
|||
|
|||
ProjectHello!
I need help about this project. I need to create text file delimit each field by a comma. Write C program that will read created file to populate a struct, reorder date and delete flag should be initialized to zero, write the structure to a binary file opened in w+ mode. After all records have been read from the text file and written to the binary file list out the records in sequential order from the binary file. I don't know guys what is going on here. I have created file that has following data: Part ID Description Unit price Qonhand ROP ROQ These are labels and data goes below. Somehow I've got the following codes but it is very hard for me to figure it out. I need your help Thanks. CPP / C++ / C Code:
|
|
#2
|
||||
|
||||
|
Please read the formatting tutorial, concentrate on the 2nd post in the thread on indentation.
Then edit your post so we can follow the program flow. __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#3
|
||||
|
||||
|
Thank you! I was just about to post to mention this and I scrolled down and saw that you beat me to it. Amir, you must definitely learn to format your code effectively. The stuff up there is as good as gibberish to my lazy eyes. Also, please give a more formal description of the assignment so that we know what it's supposed to do before we dive into the code.
__________________
-Aaron |
|
#4
|
||||
|
||||
|
Hi Amir.
I am ussually not as vocal about exact formatting, but I think if you go through and simply reformat this code, it will make better sense. For example, you have: CPP / C++ / C Code:
Which took me a minute to figure out what was going on. However, with something like: CPP / C++ / C Code:
It makes it so much easier to understand what is going on. You may be able to answer your own questions easier by doing this as well ![]() Cheers, d |
|
#5
|
||||
|
||||
|
Yeah, DSmith, reformating code to make it readable is one of the most important thing each programmer should have, but considering this, I have seen most guys don't care for it as long as the program do the job. Even my work looks messy sometimes, but I would take My time in the end to make my program reformated..
There should be a special class in schools for this.. heck, I would prefer a guy hired just to reformate the code we wrote and put comments, makes more readable... I should suggest this to my boss, but not sure what kind of response i would get... __________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds |
|
#6
|
||||
|
||||
|
Be a man... do it while you write the code :-P It's not that difficult, honestly!
__________________
-Aaron |
|
#7
|
||||
|
||||
|
Quote:
1) it would take me extra time at the end to do the formatting, increasing the programming time. During development formatting takes no longer than nonformatting. 2) I'd get lost and have to waste time trying to figure out why this loop doesn't work and why that IF is broken. Formatting helps in development. It's not just a nice thing to do. Quote:
Quote:
There are classes for this. It's called "a programming class" and if the instructor isn't teaching you how to format code, he should be tarred and feathered, and strung up by his tenure. Not teaching formatting is like teaching driver's ed and ignoring what the mirrors are for. Heck, who needs to know where they've been ![]() __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#8
|
||||
|
||||
|
Quote:
__________________
-Aaron |
|
#9
|
||||
|
||||
|
Quote:
Quote:
no i'm not lazy... I just like to work in slow motion.. Quote:
hmmmm....thats too cruel... __________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds |
|
#10
|
||||
|
||||
|
Quote:
Quote:
I'd rather you start now being a good programmer than fighting your way thru later. You'll have enough to worry about when you really enter the workforce and learning these basics will in fact help you land the job. I'm not trying to be cruel, I'm trying to give you an edge over the other 250,000 graduates looking for the same job when the time comes. You instuctor is not a professional programmer. He's a teacher. He probably doesn't know the importance of formatting code if he's not requiring you to do so. Whereas I am a professional programmer -- and I'm expensive -- and you'll just replace me 'cuz you're cheaper.... Fergit it -- don't format. I don't need the competition! ;-) __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
Recent GIDBlog
Toyota - 2008 November Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 16:41 |
| Project 2 | BobbyDouglas | C++ Forum | 1 | 09-Sep-2003 22:02 |
| Anyone need a PHP project done? | geedubya15 | New Member Introductions | 2 | 25-Jun-2003 12:29 |
| Grub's distributed web crawling project Good for webmasters running servers | jrobbio | Search Engine Optimization Forum | 4 | 25-Jun-2003 09:48 |
| GIDTopsites - my first PHP project! | JdS | GIDTopsites™ | 14 | 15-Jul-2002 05:20 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The