I'm new in this website and I want to ask you some questions about C++ because I'm learning it these days and I'm a noob (I just know C and Java).
I'm using the Stroustrup book but I still don't understand the uses and differences between classes and namespaces.
Also I did some C programs for a subject (operating systems) and I want to join all of them in a C++ program. The idea I have is to creat some modules (because the programs are rely on but they are for different purpose). And also I have a "main.cpp" file where it's defined a help function which is called several times by the modules, check if the module is available and if so, you can choose the function of the module you want (depending on the parameter you passed).
But the problem is that I don't know what's the better way to do that. What should I use? classes or namespaces? and how can I do a good design? I thought about using some design as the following:
main.cpp
--> ModuleA.cpp (implement InterfaceA.h)
--> ModuleB.cpp (implement InterfaceB.h)
--> ModuleC.cpp (implement InterfaceC.h)
I was searching on this web some other similar questions about it and I found something like this one but I think it's too complicate for my simple program.
Thank you very much :)