Note on introduction to programming in c++ 2
Answers
Answer:
Introduction
C++ is an intermediate- level, general- purpose programming language that comprises of both high- level and low- level language features .It is also known as C with classes and is derived from to programming languages: C and Simula67.
C++ was invented in the early 1980s by Bjarne Stroustrup at Bell Labs .It is similar to C, invented in the early 1970s by Dennis Ritchie, but includes modern programming techniques such as object oriented programming , classes and inheritance .
To work on C++, you need to install a computer like Turbo C++ or Borland C++.
Classes
classes are collections of data related to a single object type , its functions and methods . For example,Peacock,Sparrow and pigeon all member of class Bird . The class keyword is used to declare a class . classname follows the keyword . pair of braces mark the start and end point of the class and the semicolon is used to enter the declaration of the class . for example
class Bird
{
...
};
A C++ library is a collection of executable code , several C++ classes and their functions . after a class is created anyone can use it without knowing the specific so how it was built and how it works .
Steps to create a C++ program
- click on the Turbo C + + icon on the desktop .
- the first screen of C + + appears .
- click on the file menu and select new option from the drop-down list.
- the window that appears is known as C + + editor . type your first program .
- click on the file menu and select the save as option to save the file .type the program name as my first and the save file as box and click ok .
- press alt + F9 key to compile the program.if there are any error signal problem they will be displayed .
- press ctrl + f9 keys to see the output of the program .