Original Post
I have recently decided to do something I have never decided to do before, that is sit down and try and design my program before I code.. and I know that I can''t be the only one that gets myself in this situation.. you sit down, you code each idea as you get it, you bend and twist your code until you can''t actually do much more with it except rewrite massive chunks of it.
I started with creating a base object, cObject from which I derived cButton. Now I want a cObject to have functions for clicking and mouseover events, however I ended up having to place a DirectDraw Surface in there.. which I wasn''t too happy about. I wanted the object to be very general, and adding a directdraw interface kinda defeated my original idea.
I had next and prev pointers in my object so that I could add an object based on cObject into a list, which would iterate through and display the object, which meant I had to put the basic surface into the main object.
How do you guys go about designing you software? I have never found any really valuable object orientation tutorials, and would appreciate some advice as to how I should structure my general code. Code would be helpful I think, although a general method with a small outline of a structure I could aim at would be helpful.
Thanks for your help peoples..
Hammer
=*=
If things seem bad, think that they can get a whole load worse, and they don''t seem so bad anymore
=*=