How to install C++ | C++ Tutorials
×

How to install C++

3047

There is a wide range of free and payable C++ compilers available on the World Wide Web such as Apple C++, Borland C++, IBM C++, Sun Studio, and Turbo C++.

In this tutorial, we are providing guidance on how to install Turbo C++


  1. Download TURBO C++ from the internet, it is freely available software
  2. The second step is turboc directory creation inside your computer c drive
  3. The third step is tc3.zip extraction, which is located inside c:\turboc
  4. After extraction, double-click on the exe file
  5. You need to click on TC, which is an application file located inside c:\TC\BIN to start writing code.

C++ Basic Program

Open the C++ console, write the basic code in it.

#include <iostream.h>  
#include <conio.h>
Void main() {
clrscr();
cout << "This is your first c++ program";
getch();
}

Where, #include <iostream.h> are the header files that are known as standard input-output library functions and console input-output library functions respectively and mainly used for providing basic required functions such as cin, cout and getch function.

int main() /void main() the main function, is the core of every C++ program act as an entry point. int is used to return an integer value to indicate the program successfully executed whereas void keyword does not return any value.

getch() This function permits the users to see the output and wait for the user to press a key.

After writing a program, you need to compile and execute it. Go to the compile menu and click on compile and then click on run sub-menu to execute your first C++ program.

You can also directly execute your program by simply pressing ctrl +f9 keys.



Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments