C++ project almost complete

KillerONE said:
I'm assuming it's people LEARNING.

:rolleyes:

I know everyone HERE that starts something new is a PRO from the start.. but damn, cut him some slack.
Assuming he's learning this in school, after 4 months he should at least know how to use a loop to do that stuff, and realize that it would be a LOT more compact with a loop.

No one's bashing him for not knowing how to output the totals, everyone's complaining that what appears as about 250-300 lines of code could probably be done in about 100 lines, if not less.
 
I'd also recommend making a function to create items, it'll make all the code at the top a lot more compact.
(note: misspelling is so it's consistent with original code)

void addItem(items_total *items, char *item_name, int item_number, char *discription, int price);

That will reduce the first 73 lines of code to approximately 15 lines, and require you to write a function that contains 4 lines. In the end, you will have about 50 lines less code.
 
Back
Top