I'm not quite sure how to specify my question so I hope the title isn't confusing. I'm sure there's a proper term for what I'm looking for, but I'm too stupid to know it.
Basically I've created many programs where I'm constantly rewriting the same code over and over again and I could probably import the same code I need from another project I've worked on, but then it becomes a real hassle.
If people are familiar with the game Quake you may be familiar with it's modified language of C\C++ known as QuakeC. It's a way to modify the game without having to go and modify the original games source code and the code that you would write is in QC files. These files would then be compiled into a progs.dat file and you wouldn't mess with essential background code that might deal with rendering or specific calculations that the game needs to do.
I'm looking to do relatively the same thing. Say I have a bunch of background code such as classes, structures, and data that I wouldn't need to mess with unless I needed to do something really specific. So I would have just a few files that the programmer would use (me) that would contain functions for specific purposes such as initialization, loading files, updating game variables, and rendering. It would be all I need access to so I could create my own functions and do what I want with the classes and stuff I already have that I don't need to mess with and recreate for each new project.
I'm sorry if something like this has been asked before, but I honestly don't have a clue what to search for. This would be a really cool thing to learn how to do and I find it oddly exciting. So if anybody has any information on this it would be very much appreciated. Thank you all!