You really need to discover the magic of
a) indentation
b) functions.
A 800+ lines of code in main(), c'mon be serious.
Nobody is going to wade through that lot just to spot what might be wrong.
A rough rule of thumb - if you can't see the entire function on screen at the same time (from it's opening brace to it's closing brace), then it's probably too big to manage.
I bet all those header files have code inside them as well right?
How about a separate function for each top-level menu choice.
>> snipped from the code...
float edit_instrument1[5]; //edit the instrument for a note
Instrmnt *instrument1 = 0; // This variable will hold the instrument information
// snip
float edit_instrument2[5]; //edit the instrument for a note
Instrmnt *instrument2 = 0; // This variable will hold the instrument information Why isn't this screaming at you to be
a) a struct containing several things
b) an array of that struct.
That would cut down significantly on the number of variables you have.
Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953