Ubuntu not printing hello world c++

cantt get it to terminal please help!

found the solution myself by chance, after compiling programe use this: ./a.out

Compiling doesn’t run the program, it creates it. If you don’t name the output GCC will call it a.out. To give it a name use -o e.g.

g++ triplex.cpp -o triplex
./triplex

Thanks for replying. Brilliant even easier. Much appreciated

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms