Breaking

Post Top Ad

Thursday, June 14, 2018

How to program c++ in Kali Linux

I installed linux in my system and then i wanted to write a c++ code for my school project and got stuck up there as dosbox wasn't working. I had to figure it out as fast as possible. Then i did this and it worked. lets see how you can program c++ in terminal.



Step 1~ Fire up Terminal.

=> Open up your terminal and type "nano program name.cpp" and hit enter. You would see something like this.

  


 for my program i have chosen name hlloworld.cpp.


Step 2 ~ Write the program.  

=> Now write your program without any hesitation. Here I've written a sample program.


Step 3 ~ Compile your program.  
   

=> Now hit ctrl+x then y to save your program.
=> Now type "g++ program name.cpp" in order to compile your program. If there are no errors then a file with name a.out will be created in your directory.
=> Now to execute your program type "./a.out" . Voilaa your program will get executed.



5 comments:

  1. Great Information, Get the best Python Training in Chennai from Hope Tutors.

    ReplyDelete
  2. Thank you ..... Now that you saw mine i hope you will make a better one. I am curious give me a link after you have completed urs.

    ReplyDelete
  3. As for me, such things are still incomprehensible and I try to use ready-made applications. That is why I am of the opinion that the use of applications running in the clouds is very important. I work best with the company https://grapeup.com/ which applications are the best for me.

    ReplyDelete

Post Top Ad