Introduction to C++

What is C++ ?

C++ is a middle-level programming language developed by Bjarne Stroustrup at AT&T Bell Laboratories in Murrey Hill , New Jersey , USA , in the early 1980’s. Why C++ is called middle-level programming language? Because it encapsulates both high level and low level language features. Stroustrup was a worshiper of Simula67 and a strong supporter of C. He wanted to combine the best of both the languages and create a more powerful language that could support object-oriented programming features and still retain the power and efficiency of C. The result was C++.

Creating a program

Suppose you’ve written a C++ code. Now you want to run this program.But how? The exact steps depends on your computer environment and the particular C++ compiler you use, but they should follow the below steps :

  1. Use a text editor to write the program and save it in a file. This file includes the source code for your program.
  2. Compile the source code you’ve written.This means running a program that translates the source code for your program.
  3. Link the object code with additional code. For example, C++ programs normally use libraries. A C++ library contains object code for a collection of functions. To perform tasks such as displaying information onscreen or calculating square root of a number. Linking combines your object code with the functional object code that you have used and with some standard startup code to produce a runtime version of your program. In this case, we will get an .exe file. This exe file contains the final product called the executable codeScreenshot from 2018-05-21 17-11-16

Environment Setup for C++

To setup environment for C++ , you need to have some software which is called IDE. IDE means Integrated Development Environment , a platform where computer programmers write code for software development. An IDE is consist of

  • Source Code Editor
  • Compiler
  • Debugger

Now i am recommending some best IDE for writing and debugging code in C++. They are :
Visual Studio IDE
CodeBlocks IDE
CLion IDE

Choose one of them and start coding C++. These IDE have smart editor . You can easily write and debug code. Happy Coding.

Leave a comment

Website Powered by WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started