I'm in the planning stage of a relatively large (10k+ lines) project with several classes (30+) and several levels of class inheritance (5+).
Thanks,
Advait
1) Yes. One file per class in most cases is a good idea. Unless you have a really trivial class, or a collection of abstract interfaces, use one class per file.
2) Try to separate things. Usually in a project that big, you'll have some code that are specific to some parts, others that are common to many parts. Those that are very limited in usage, just keep it 'locally'. Others, put is in include dirs.
3) No need really. It is usually better to keep classes (i.e. files) which are closely related, close together; I'd try to keep them together, unless you have something like a generic interface, in your global includes, and specific inheritance inside a module dir.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With