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

Best Programming Course in Jalandhar - TechCADD Computer Education

C++ is a versatile programming language developed by Bjarne Stroustrup in 1979, known for its object-oriented features and wide application in software and game development. The document covers essential C++ concepts including data types, variables, control structures, classes, and the Standard Template Library (STL). It also provides information on setting up a C++ development environment with various compilers and IDEs.

Uploaded by

p94549974
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 views11 pages

Best Programming Course in Jalandhar - TechCADD Computer Education

C++ is a versatile programming language developed by Bjarne Stroustrup in 1979, known for its object-oriented features and wide application in software and game development. The document covers essential C++ concepts including data types, variables, control structures, classes, and the Standard Template Library (STL). It also provides information on setting up a C++ development environment with various compilers and IDEs.

Uploaded by

p94549974
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

Contact

+919888122255

1. Introduction to C++
C++ is a powerful general-purpose programming language created by
Bjarne Stroustrup in 1979. It is an extension of the C programming
language with added features such as classes, inheritance,
polymorphism, and templates, making it a multiparadigm language.
C++ is widely used for system/software development, game
development, real-time simulation, and performance-critical
applications.

https://techcaddcomputerinstitute.com
Before writing C++ code, you need to install a compiler. Popular options include:
GCC (GNU Compiler Collection) — commonly used on Linux and macOS
Microsoft Visual C++ — included in Visual Studio on Windows
Clang — a modern compiler for macOS and Linux
You can write C++ code in any text editor (like VS Code, Sublime Text) or IDE (like Visual Studio, Code::Blocks, CLion).
DATA TYPE AND VARIABLES

DATA TYPES VARIABLES int — integer numbers (e.g., 1, -3)


Basic Data Types: float — floating-point numbers (e.g., 3.14)
int — integer numbers (e.g., 1, -3) int — integer numbers (e.g., 1, -3)
float — floating-point numbers (e.g., float — floating-point numbers (e.g., double — double precision floating-point
3.14) 3.14) char — a single character (e.g., 'A')
double — double precision floating-point double — double precision floating-point
char — a single character (e.g., 'A') char — a single character (e.g., 'A') bool — boolean values (true or false)
bool — boolean values (true or false) bool — boolean values (true or false)
Contact

Key Features:

Proficiency In a Logical Thinking


Programming and Problem-
Language Solving Abilities
Object-Oriented Programming (OOP) support
Low-level memory manipulation capabilities
Extensive Standard Template Library (STL)
Cross-platform support
Ability To A Growth
Collaborate In Mindset For
Team Lifelong
Environments Learning
Every C++ program consists of functions and declarations. The entry point is the main() function.
cpp
CopyEdit
#include <iostream> // preprocessor directive for input-output libraryint main() {
std::cout << "Hello, World!" << std::endl; // output statementreturn 0; // exit status
}
Conditionals: Loops:
for loop: repeated execution a known number of times
while loop: repeated execution while condition is true
if (age >= 18) { do-while loop: executes at least once
Example:
std::cout << "Adult" << std::endl;
} else {
std::cout << "Minor" << std::endl; for (int i = 0; i < 5; ++i) {
std::cout << i << " ";
}
}
Every C++ program consists of functions and declarations. The entry point is the main() function.

#include <iostream> // preprocessor directive for input-output library

int main() {
std::cout << "Hello, World!" << std::endl; // output statement
return 0; // exit status
}

Explanation:
#include <iostream> imports the standard I/O library.
int main() defines the main function returning an integer.
std::cout outputs text to the console.
return 0; indicates successful program termination.
V
Classes and Objects

class Car {
public:
std::string brand;
int year;
void honk() {
std::cout << "Beep beep!";
}
};

int main() {
Car myCar;
myCar.brand = "Toyota";
myCar.year = 2020;
myCar.honk();
}
class Vehicle {
public:
void start() { std::cout << "Vehicle started"; }
};

class Car : public Vehicle {


public:
void honk() { std::cout << "Beep!"; }
};
Home About Us Services Contact

Get In Touch

+91 9888122255

www.techcadd.com

[email protected]

opp. All India Radio Station, near Bus Stand,


New Jawahar Nagar, Jawahar Nagar,
Jalandhar,

Lorem ipsum odor amet, consectetuer adipiscing elit. Hac


nibh vulputate penatibus ultricies pharetra lacinia. Tempor
risus ullamcorper curae augue sociosqu porta augue
nascetur.
Containers: vector, list, map, set,
queue, stack

Algorithms: sort, find,


Introduction reverse, count

The Standard Template Library (STL) is a powerful set of


C++ template classes and functions that provide commonly
used data structures and algorithms. It is part of the C++
Standard Library and helps programmers write efficient and Iterators: to traverse
containers
reusable code without having to implement fundamental
data structures and algorithms from scratch.

You might also like