If your programs consist of more than 1 source file each, make one project for each program. That is what they are for.
Apart from selecting files, a project contains all the helpful information, how to make a running binary,
exactly all those things you cry for. You can compile and run each project independently.
Your workspace shows the currently loaded projects (e.g. your 2 programs). If you double click
on a projectname in the workspace area, it becomes the active project, that is compiled and run
if you click on the buttons.
Other IDEs do excactly the same thing.
You can always call a C++ compiler without codeblocks from the commandline, like:
g++ -Wall -o myprog.exe myprog.cpp
That is about as easy as it can get.