0% found this document useful (0 votes)
10 views8 pages

2.beginning With C++

The document provides an overview of C++, including its history, applications, and program structure. Developed in 1980 at AT&T Bell Laboratory, C++ is an object-oriented programming language that enhances C with features like classes and templates. It is versatile for various applications and allows for easy maintenance and expansion of programs.

Uploaded by

Tejashree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

2.beginning With C++

The document provides an overview of C++, including its history, applications, and program structure. Developed in 1980 at AT&T Bell Laboratory, C++ is an object-oriented programming language that enhances C with features like classes and templates. It is versatile for various applications and allows for easy maintenance and expansion of programs.

Uploaded by

Tejashree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Beginning with C++

Prof. Tejashree V. Pawar


Cummins College of Engineering
Agenda
● History of C++
● Applications of C++
● Structure of a C++ program
● Creating, compiling and linking
History of C++
Developed at AT&T Bell Laboratory
in Murray Hill,New Jersey, USA in
1980.

Originally called “C with classes”

● The name C++ is based on C’s


increment operator (++)
● Indicating that C++ is an
enhanced version of C
What is C++?
An object-oriented Programming language.

(Mostly) an extension of C to include:–

● Classes
● Templates
● Inheritance and Multiple Inheritance
● Function and Operator Overloading
● New (and better) Standard Library
● References and Reference Parameters
● Default Arguments
● Inline Functions
Applications of C++
● Versatile language- used for development of editors, compilers,
databases, communication systems and any complex real-life application
systems.
● Since C++ allows us to create hierarchy-related objects, we can build
special object-oriented libraries which can be used later by many
programmers.
● While C++ is able to map the real-world problem properly, the C part of
C++ gives the language the ability to get close to the machine-level
details.
● C++ programs can be easily maintainable and expandable. When a new
feature needs to be implemented, it is very easy to add to the existing
structure of an object.
Structure of a C++ program

Include files

Class declaration

Member function definition

Main function program


Creating the source file
Use appropriate text editor depending on OS.
File extension:
● Turbo C++ and Borland C++ = .cpp
● Zortech C++ = .cxx
● UNIX = .C and .CC
● Linux = .cpp
Compiling and linking in Linux
Compiling: g++ compiler
1. g++ example.cpp : this create the default executable file
a.out
2. g++ file1.cpp file2.o : compiles the only the file file1.cpp
and links it with the previously compiled file2.o file

You might also like