I'm writing simple program in c++ using netbeans. I want it should be executable thru ubuntu terminal as other do
like "php samel.php" it works I want something like this
please guide me how to do this
I'm writing simple program in c++ using netbeans. I want it should be executable thru ubuntu terminal as other do
like "php samel.php" it works I want something like this
please guide me how to do this
Firstly, save your code in form of a file. Let's say the file name is xyz.c
Open the terminal and change the directory to the location where your file is(use cd command).
After that compile as g++ xyz.c
This will compile your code. Doing that will produce an executable file a.out, which you can run by typing ./a.out