Maybe this answer already exists here, but I do not know if there is any technical term for that.
I'm starting to develop in C ++ and as the program grows in size, it gets harder to move through the source code.
However within the code there are several parts that are already 'solved', that is, I do not need to change them anymore, but they are there, in the middle of the source code, and I have to go through them all the time, which disturbs the concentration and often confuses.
For example, a simple "if" can occupy a whole screen (more or less 30 to 40 lines). I do not need to mess with it anymore, but it's not a function, it's not a class, just a part of the code that has to be there.
Some editors allow me to collapse the part of a code, for example the if, something I already do, sometimes it gets lost and the code reappears.
Maybe I cut the program into logical parts and put it in separate files, then inserting them into the main source code through an 'include', but that would be ugly ...
Anyway, I come here to ask: how to deal with large source codes in the best way?