I currently have a folder "C++" and within it a bunch of projects. It looks a little like this (obviously I haven't named them Project1 etc.):
C++
Project1
Project2
Project3
Now this used to work fine up until I started having the need to use a class that I made from another project. I thought of copy-pasting the class but this wouldn't work as if I updated the original class, the copied ones wouldn't be updated. Also, I'd have to guess in which project I made the class in. Then I thought of calling it from the other project itself but then if I were to package the project it wouldn't work as it wouldn't include the classes from external folders (at per my knowledge).
The only other thing I can think of is within my "C++" folder I have a folder named something like "Codebase", where I store all the classes and the like, and another folder called "Projects" or something and keep "Project1", "Project2" etc. in there and call the classes from the codebase (thus solving the problem where I can't find where a specific class I made is). However, again, I don't know packaging the final product would work. How do you, or professionals, people on GitHub etc. do it?