Introduction to C (2)
Introduction to C (2)
C++
Discover the powerful programming language C++,
used to build everything from video games to
operating systems. Dive into its rich history,
versatility, and bright future as we explore the
fundamentals.
The Creator of C++
C++ was created by Bjarne Stroustrup in the 1980s.
He developed C++ as an extension of the C
programming language to provide additional
features like object-oriented programming.
Stroustrup's work on C++ has had a significant
impact on the field of computer science and
software development.
Why learn C++?
1. C++ is a powerful and versatile language used to build everything
computer science.
and gaming.
optimization - skills that are highly sought after in the tech industry.
Games Created with
C++
1. Many of the world's most popular video
games, including Fortnite, Minecraft, and
Call of Duty MW: are built using the C++
2. programming language.
C++ is a powerful language that allows game
developers to optimize performance and access
low-level system resources, making it a preferred
choice for creating high-intensity, graphics-rich
3. gaming experiences.
Game engines like Unreal Engine that power AAA
titles are predominantly written in C++,
showcasing its versatility and suitability for
complex game development projects.
Hello World Tutorial
in C++
• Learn the basic syntax and structure of C++ programs.
• Write a simple "Hello, World!" program to get
started with C++.
• Understand the role of the main() function
and how to output text to the console.
Hello World!
#include<iostream> //adding a library
int main(){
} //End
int x = 5; //Declaring x
int main(){
int x; //Variable x
} //end of code
Basic C++ Syntax
C++ has a simple but powerful syntax that allows
you to write clear, readable code. Each line of C++
code is a statement, and these statements are
grouped together into functions and classes. The
structure is similar to English, with keywords like
"if", "while", and "return" to control the flow of your
program.
To write C++ code, you'll use a text editor and a
compiler to turn your code into an executable
program. The compiler checks your syntax and
translates your high-level C++ instructions into the
low-level machine language that computers can
understand.
Operators and Expressions
Arithmetic Comparison Logical Expressions
Operators Operators Operators
An expression is a
C++ provides the Comparison Logical operators combination of
standard operators like like && (and), || variables,
arithmetic ==, !=, <, and > (or), and ! (not) let operators, and
operators like +, -, allow you to check you combine and values that
*, and / to perform if two values are negate different evaluates to a
calculations. You equal, not equal, conditions to single result.
can use these to less than, or make more Expressions are
add, subtract, greater than each complex decisions the building blocks
multiply, and other. in your code. of C++ programs,
divide numbers in allowing you to
your programs. perform all kinds
Functions and Parameters
What are Functions? Parameters
Functions are like mini- Parameters are special
programs within your C++ variables that you can pass
code. They allow you to group into a function. This lets the
related lines of code together function accept information
and give them a name. This from the outside world and use
makes your programs more it to do its job. Functions can
organized and easier to have multiple parameters of
understand. different types.
Careers with C++
1. Software Engineer: C++ is widely used for developing
system-level software, operating systems, and
performance-critical applications like video games,
financial trading platforms, and scientific simulations.
Evgenios
Th.
Theodosiou
David
Stepanya
n
Raphael
Nicolaos