MemberAugust 18, 2022 at 2:09 pm
Dear Naseer Abdul,
Please first make sure that GNU gcc compiler is installed on your machine.
1. Open the Ubuntu terminal
2. Type the command, which gcc
You should see the output /usr/bin/gcc
If you get the same output, it means gcc compiler is installed on your machine.
Otherwise, you can install gcc by running the command,
sudo apt-get install gcc
Once you have gcc installed please follow the steps below to compile and run the program.
3. Make a Workspace folder at the following location,
4. Create the HelloWorld.cpp in the Workspace folder
5. Now compile using the command,
6. Execute the program by typing the following on the command line,
You will see the expected output on the terminal. Hope that helps.