Hello,
I have a very simple question.
I need to include a class for a particular method.
Now, I know how to create a class, I know how to split a class between a header for its declaration and its methods using a header. I have even read how to use #IF #ENDIF macros to only include headers once.
But I would be really interested to hear what people reckon is the best way to put all of this together for access from a main class.
My main class is sprawling because I have a menu method (for main) to a load of different methods, and it is only a sub-sub-sub method to this class that needs to use the class.
I want to grow the method more, with more classes, so I really looking for housekeeping advice here - the best way to separate parts while keeping things clear.
Most of my experience is in Java, where it is simply a matter of throwing everything in the same folder.
So, if someone could offer a simple template for how I should structure class definitions in a main class I would be very grateful.
So, should I declare the class in the main file? Should I declare it in a separate class?
Should I split in between a cpp file and a h file?
If so, do I only need to include the header?
A tiny bit of sample code would be excellent.
Thanks!