As the question states, i am a C#/Java programmer who is interested in (re)learning C++. As you know C#/Java have a somewhat strict project file structure (especially Java). I find this structure to be very helpful and was wondering if it is a) good practice to do a similar structure in a C++, b) if so, what is the best way to setup it up?
i know there is the basic ‘headers’ and ‘source’ folders, but is there a better way?
I find the structure of java projects quite nice. I do it like this (root is the root directory)
root/include/foo/bar/baz.hpp becomes
in code.
I keep the source in
root/src/foo/bar/baz.cpp . If i have some stuff that is not exposed to the outside, i put it into a detail/ directory and namespace. I keep the makefiles at root/.