You can compile and run your C/C++ programs in Ubuntu also by using DOSBox Emulator. First of all you have to download DOSBox Emulator from USC [Ubuntu Software Center].
Then you have to mount you home directory by typing "mount c ~". Then you have to put your already installed TC directory in your home directory. You can install your TC also. Here I put my TC directory in home and open it as shown in snaps.
Now your TC is ready for work.