cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Best practice with classes question
Best practice with classes question
Nov 14, 2013 at 7:48pm UTC
beebe
(3)
Let's say I write a program with several classes so that I get something like this:
mainHeader.h, mainFunctions.cpp, main.cpp,
class1.h, class1.cpp,
class2.h, class2.cpp,
...
Is it an okay practice to stick structs, variables, and functions in mainHeader.h and main.cpp that will be used by the classes or should the classes be totally self-contained?
Topic archived. No new replies allowed.