I don't understand what you mean....
Surely you just open one terminal and navigate to the location of the source code/makefile for your program and compile your program from there.
You can open another terminal and navigate to the same location and run the executable that you compiled in the other shell. I don't see where the problem is!
If you use a terminal emulator like Terminator, you can split a single terminal window horizontally and vertically any number of times using built-in keybinds to create multiple terminal sessions in a single window. If that's any help?!
WRT running programs in the terminal:
If you have a program which is running in the terminal as a foreground process and it's stopping you from doing things on the command line whilst it runs, you can use the ctrl-z key combo to stop/pause it. NOTE: This does not kill the program/process, it merely stops/pauses it.
After stopping/pausing a program using ctrl-z, you can resume it in the foreground using the fg command. Or if you have multiple processes stopped, you can use the command:
to start a particular process running again - Where {pid} is the process ID of the process. NOTE: the PID will always be a number.
Alternatively if you want it to restart a stopped program to run in the background, you can use the bg command. Again, bg can take a process ID as a parameter if you have multiple processes that are stopped.
To list all of the processes that are associated with the current terminal, you can use the command:
And of course if you want to stop a program/process running altogether, you can use the kill command.
Is that any help to you?
Otherwise, can you explain more clearly what you are after because I am out of ideas!