Thursday, June 7, 2018

How to install C++ in mobile/in termux

Hy friends,
         Welcome back to my blog again. I am Alok Garia  the admin of this blog. Today i am going to tell you that how you can install and run C++ in termux. For this we will use termux which is a terminal emulator.

What is Termux :

From the website of termux, it is a terminal emulator and also the small version of linux, which is compatible for smartphones. 
      With termux you can run a small linux environment on your android device. 

Basic Needs :

1 - You must have an android device which have android version of 5.0 (lollipop ) or above. 
2 - Termux app  ( you can easily find this from play store by just typing termux )
3 - Hacker's keyboard  ( it is also available in play store )
4 - And the most necessary thing is patience and brain 
5 - Don't do spelling mistakes

How to Install :



1 - To install termux in your android device , first turn on your mobile data and go to play store. search termux and download it from there. 
2 - After successful installation open and update it by typing the below command. 

[ pkg update ]

3 - Now upgrade it by typing the below command.

[ pkg upgrade ]



4 - To install C++ , install the clang package in termux. To install clang package in termux type the below command. 

[ pkg install clang ]



5 - Now install a text editor like vim/ nano. To install nano text editor please run the below command.

[ pkg install nano ]




6 - You can also install vim text editor. To install the vim text editor please run the below command.

 [ pkg install vim ]

7 - After installing the clang package and a text editor you can now compile and run the C++ programmes in termux. In this case i preferred to use the nano text editor. If you like the vim text editor then type vim in place of nano.

How To Run :



1 - To write a programme first create a folder using the nano text editor. In this case i used HelloWorld as the file name. To create a file using nano text editor please run the below command.

[ nano  filename.c ]


2 - Now press enter and write the C++ programme as shown in the below screenshot . In this case i have used a programme of Hello World.

3 - Now save the C++ programme by typing ( ctrl + x ) and then ( y ) . Then press the enter button. Your file will be saved.


4 - now run e below command to prepare  the folder for run.

[ clang  filename.c  -o  filename ]


5 - Now run the below command to get the output of the programme which u have typed.

[  ./filename.c  ]


6 - Thats all you will get the output. Make sure that your programme is correct, otherwise it won't give the output.

Precaution :



1 - During the whole process make sure that you are connected to the internet. 
2 - Don't do spelling mistakes, Otherwise your command won't run properly. 
3 - Stay calm and composed so that you can solve all the problems you are facing in termux. 

My Words For You :

Thats all for today's topic. I hope that you will understand the whole process of installing C++ in termux. If you have learned something from my blog, then its an honour for me as an admin. Keep visiting to my blog, keep supporting. 

                   《 GOOD BYE 》

2 comments:

  1. $ pkg install vim
    $ pkg install clang
    $ vim main.cpp
    $ clang++ -Wall main.cpp -o program
    $ ./program


    ![enter image description here](https://i.stack.imgur.com/lm2zb.png)![enter image description here](https://i.stack.imgur.com/UnXhr.png)

    ReplyDelete
  2. My relationship was in a mess a week back. I kept on complaining and was steadily worried if my spouse was cheating on me. till my sister referred me to this ethical hacker which had helped a friend of her spy on her cheating finance phone. Kelvin grants me access to every information on my wife's phone including deleted once and also photos. I have access to read all his (social media text) Whatsapp, Facebook,Skype,Instagram and Snapchat messages Including the deleted text and unread messages. Although I finally found out he was not cheating. If you have the same issues like me contact ethical hackers through gmail via kelvinethicalhacker@gmail.com. call/text +1(341)465-499. for help to help you find out the statute of your relationship.

    ReplyDelete