C++ complier for Ubuntu

claptonman

New Member
Anyone have a good compiler for Ubuntu? Didn't like the choices for windows, so I installed ubuntu on my laptop. Doing a lot of compiling for my school, so any suggestions are welcome.
 

Troncoso

VIP Member
Write your code in a .C or .cpp file then run

Code:
gcc filename
to run the program you do

Code:
./a.out
if you don't want the program to be named "a.out" do

Code:
gcc -o desiredname filename
then just run

Code:
./desiredname
Keep in mind, you need to be in the same directory as the source file, else, everywhere that you see "filename", you'll need to include the path to the file.
 
Last edited:

claptonman

New Member
Ok, sorry for all the questions, but I'm new to linux. What directory do I need to be in? And how do I do that?

Edit: figured it out. Very cool!
 
Last edited:
Top