Answer the question
In order to leave comments, you need to log in
How to properly organize the code of a large project in C ++ (and not only)?
Sooner or later, we all cross the line when writing helloworlds becomes boring and you want to create something big and cool. But so that the project does not turn into a big stinking pile of code, you need to competently approach its organization.
I would like to hear opinions on how you organize the code of your projects (preferably C ++). This is not only about the layout of the code into directories and the names of variables, but also about the architecture in general.
For example, I see for myself the following option.
Briefly about the style code (in principle, you can not read, there are thousands of them, I just like this one):
class EventHandler;
.Image backgroundImage;
.double percent_of_fails;
void addModule(std::shared_ptr<Module> module);
engine/
|
|-engine.i
|-core.h
|-core.cpp
|-math/
|
|-math.i
|-vector3d.h
|-vector3d.cpp
|-scene/
|-
|-scene.i
|-scene.h
|-scene.cpp
|-object.h
|-object.cpp
engine::Core
engine::math::Vector3D
@import engine
@from engine::math import *
Answer the question
In order to leave comments, you need to log in
Capitalized class names in CamelCase, such as class EventHandler;.
..
). Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question