| | |
sequencer
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2006
Posts: 6
Reputation:
Solved Threads: 0
hi there im having some problems, im trying to write a simple software sequencer in visual C++ under windows. I have a few problems my first two menus open up fine but the third wont open it just loops on the title menu. The second probelm i have is that all the sections dont play together any help would be great cheers ontrix code attached
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...
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.
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...
C++ Syntax (Toggle Plain Text)
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
a) a struct containing several things
b) an array of that struct.
That would cut down significantly on the number of variables you have.
![]() |
Similar Threads
- how to insert sound in vb6 programming (Visual Basic 4 / 5 / 6)
- Freeware FL Studio? (Windows Software)
- Codes FOr VGA/SVGA using ports and not interrupts (Assembly)
- Sound in Python (Python)
- Can't save audio with my avi files (Windows NT / 2000 / XP)
- Using VB to control midi (Visual Basic 4 / 5 / 6)
Other Threads in the C++ Forum
- Previous Thread: pls help
- Next Thread: print out the solve word puzzle
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






