- Right click on the desktop and choose create a document , then choose empty file.
- Give it any name with the extension .sh .For Example- priya.sh
- Open the file and write the following command:
sudo apt-get install g++
- Now save the file by choosing file>>save.
- Now right click on the file and choose Permission Tab.
- Change to Read and Write File and click in the checkbox "Allow Executing Files as program"
- Now open the terminal by choosing Applications>>Accessories>>Terminal
- Now type the following:
./priya.sh (to run the file to install g++ in terminal mode)
Press "y" for continue.
Your g++ has been installed now.
To run the programs in g++:
- First write the program in the file with the extension .cpp. e.g rr.cpp
- To run the program, go to the terminal and write the command:
g++ rr.cpp
- With this a blue colour file will automatically be created on the desktop i.e a.out
- Also in the terminal you will remain on the prompt sign even after gining the above command
- now write;
In brief:
ReplyDelete1) Applications>>Accessories>>Terminal
2) sudo apt-get install g++
[Copied and pasted from original post]