C++ or C-plus-plus or Cpp is an extremely popular object-oriented programming language. Created in 1979, today it powers game engines, databases, compilers, embedded systems, desktop software, and much of our software infrastructure. 

#programming #compsci #100SecondsOfCode

🔗 Resources

Microsoft Docs https://docs.microsoft.com/en-us/cpp/
 Bjarne Stroustrup Homepage https://www.stroustrup.com/
C in 100 Seconds https://youtu.be/U3aXWizDbQ4
C# in 100 Seconds https://youtu.be/ravLFzIguCM

🔥 Get More Content - Upgrade to PRO

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- What is C++?
- C++ basics tutorial
- Who invented C++?
- What is C++ used for?
- What is a smart pointer?
- C++ vs C
- Object oriented programming basics
2024-02-04T05:34:58.821Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
35cb5f2b-1e3d-4d15-b5cd-83e3b85b5a8d
d68535993d94438f9ea8ba90caa5ce375505047c754b758cfbfbbb43fde38b94
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
C plus plus a statically typed compiled programming language famous for its widespread use in software infrastructure and infamous for its steep learning curve.
It was created in 1979 by Bjorn Straustrup at AT and T Bell Labs.
He was inspired by the object oriented nature of Simula, but needed a language with a high performance of c, and thus, c with classes was born.
It's designed as a superset of c, which means that virtually any c program is also a valid c plus plus program, but it also adds 0 overhead abstractions, such as object oriented patterns like polymorphism, encapsulation, and inheritance.
Today, it's used in a wide variety of systems with constrained memory demands, like the unreal engine for triple a video games, programs like Adobe After effects that were used to edit this video, databases like MySQL and MongoDB, embedded systems like the display on your Smart Toaster, and is used to implement much of low level infrastructure, like language compilers and virtual machines.
It's so popular because it provides low level memory and hardware control like c, but with high level abstractions like classes and smart pointers.
C plus plus makes it harder to shoot yourself in the foot, but when you do, it'll blow your whole leg off.
To get started, install a c plus plus compiler like GCC or Clang, then create a file ending in cpp.
Include iostream from the standard library to handle input and output.
Your code will start executing from the main function.
To print hello world, we simply use standard character output followed by the bitwise shift left operator and a string literal.
We can get rid of this s t v though by adding namespace to the top of the file.
Now, if we want to create a string variable, we can do so by typing it as an array of characters.
However, if we include string from the standard library, worry.
We can use the string type instead.
The real game changer though is the fact that c plus plus supports object oriented programming with classes.
A class is just a blueprint for an object.
Inside a class, you can define attributes and methods that will be private by default or make public by adding them under the public specifier.
It's also possible to define methods outside the class definition using a double colon.
Methods can also be defined multiple times with different parameters, which is known as overloading and is a form of polymorphism.
In addition, we can define constructors and destructors learners to run code when an object is created or destroyed.
Classes also support inheritance, allowing developers to more efficiently share logic throughout a program.
To instantiate an object, type the class name followed by the name of your object, and optionally any parameters for the constructor.
When it comes to memory, we could manage everything manually with pointers and references.
However, tools like unique pointer can get the job done in a way that's easier and safer by ensuring that only one object can be allocated to learning.
Now to run your code, open up the terminal and use a tool like Clang plus plus to compile it.
This has been c+in100 seconds.
Hit the like button and subscribe if you wanna see more short videos like this.
Thanks for watching and I will see you in the next one.

Speaker 0: C plus plus a statically typed compiled programming language famous for its widespread use in software infrastructure and infamous for its steep learning curve. It was created in 1979 by Bjorn Straustrup at AT and T Bell Labs. He was inspired by the object oriented nature of Simula, but needed a language with a high performance of c, and thus, c with classes was born. It's designed as a superset of c, which means that virtually any c program is also a valid c plus plus program, but it also adds 0 overhead abstractions, such as object oriented patterns like polymorphism, encapsulation, and inheritance. Today, it's used in a wide variety of systems with constrained memory demands, like the unreal engine for triple a video games, programs like Adobe After effects that were used to edit this video, databases like MySQL and MongoDB, embedded systems like the display on your Smart Toaster, and is used to implement much of low level infrastructure, like language compilers and virtual machines.

It's so popular because it provides low level memory and hardware control like c, but with high level abstractions like classes and smart pointers. C plus plus makes it harder to shoot yourself in the foot, but when you do, it'll blow your whole leg off. To get started, install a c plus plus compiler like GCC or Clang, then create a file ending in cpp. Include iostream from the standard library to handle input and output. Your code will start executing from the main function.

To print hello world, we simply use standard character output followed by the bitwise shift left operator and a string literal. We can get rid of this s t v though by adding namespace to the top of the file. Now, if we want to create a string variable, we can do so by typing it as an array of characters. However, if we include string from the standard library, worry. We can use the string type instead.

The real game changer though is the fact that c plus plus supports object oriented programming with classes. A class is just a blueprint for an object. Inside a class, you can define attributes and methods that will be private by default or make public by adding them under the public specifier. It's also possible to define methods outside the class definition using a double colon. Methods can also be defined multiple times with different parameters, which is known as overloading and is a form of polymorphism.

In addition, we can define constructors and destructors learners to run code when an object is created or destroyed. Classes also support inheritance, allowing developers to more efficiently share logic throughout a program. To instantiate an object, type the class name followed by the name of your object, and optionally any parameters for the constructor. When it comes to memory, we could manage everything manually with pointers and references. However, tools like unique pointer can get the job done in a way that's easier and safer by ensuring that only one object can be allocated to learning.

Now to run your code, open up the terminal and use a tool like Clang plus plus to compile it. This has been c+in100 seconds. Hit the like button and subscribe if you wanna see more short videos like this. Thanks for watching and I will see you in the next one.
C plus plus a statically typed compiled programming language famous for its widespread use in software infrastructure and infamous for its steep learning curve. It was created in 1979 by Bjorn Straustrup at AT and T Bell Labs. He was inspired by the object oriented nature of Simula, but needed a language with a high performance of c, and thus, c with classes was born. It's designed as a superset of c, which means that virtually any c program is also a valid c plus plus program, but it also adds 0 overhead abstractions, such as object oriented patterns like polymorphism, encapsulation, and inheritance. Today, it's used in a wide variety of systems with constrained memory demands, like the unreal engine for triple a video games, programs like Adobe After effects that were used to edit this video, databases like MySQL and MongoDB, embedded systems like the display on your Smart Toaster, and is used to implement much of low level infrastructure, like language compilers and virtual machines.
programming
software
video gaming
computer science
multimedia
software development
deep learning
computers
It's so popular because it provides low level memory and hardware control like c, but with high level abstractions like classes and smart pointers. C plus plus makes it harder to shoot yourself in the foot, but when you do, it'll blow your whole leg off.
To get started, install a c plus plus compiler like GCC or Clang, then create a file ending in cpp. Include iostream from the standard library to handle input and output. Your code will start executing from the main function. To print hello world, we simply use standard character output followed by the bitwise shift left operator and a string literal. We can get rid of this s t v though by adding namespace to the top of the file. Now, if we want to create a string variable, we can do so by typing it as an array of characters.
programming
However, if we include string from the standard library, worry. We can use the string type instead. The real game changer though is the fact that c plus plus supports object oriented programming with classes. A class is just a blueprint for an object. Inside a class, you can define attributes and methods that will be private by default or make public by adding them under the public specifier. It's also possible to define methods outside the class definition using a double colon. Methods can also be defined multiple times with different parameters, which is known as overloading and is a form of polymorphism. In addition, we can define constructors and destructors learners to run code when an object is created or destroyed. Classes also support inheritance, allowing developers to more efficiently share logic throughout a program. To instantiate an object, type the class name followed by the name of your object, and optionally any parameters for the constructor. When it comes to memory, we could manage everything manually with pointers and references.
However, tools like unique pointer can get the job done in a way that's easier and safer by ensuring that only one object can be allocated to learning. Now to run your code, open up the terminal and use a tool like Clang plus plus to compile it. This has been c+in100 seconds. Hit the like button and subscribe if you wanna see more short videos like this. Thanks for watching and I will see you in the next one.
youtube
programming
streaming
software development
C plus plus a statically typed compiled programming language famous for its widespread use in software infrastructure and infamous for its steep learning curve. It was created in 1979 by Bjorn Straustrup at AT and T Bell Labs. He was inspired by the object oriented nature of Simula, but needed a language with a high performance of c, and thus, c with classes was born. It's designed as a superset of c, which means that virtually any c program is also a valid c plus plus program, but it also adds 0 overhead abstractions, such as object oriented patterns like polymorphism, encapsulation, and inheritance. Today, it's used in a wide variety of systems with constrained memory demands, like the unreal engine for triple a video games, programs like Adobe After effects that were used to edit this video, databases like MySQL and MongoDB, embedded systems like the display on your Smart Toaster, and is used to implement much of low level infrastructure, like language compilers and virtual machines. It's so popular because it provides low level memory and hardware control like c, but with high level abstractions like classes and smart pointers. C plus plus makes it harder to shoot yourself in the foot, but when you do, it'll blow your whole leg off. To get started, install a c plus plus compiler like GCC or Clang, then create a file ending in cpp. Include iostream from the standard library to handle input and output. Your code will start executing from the main function. To print hello world, we simply use standard character output followed by the bitwise shift left operator and a string literal. We can get rid of this s t v though by adding namespace to the top of the file. Now, if we want to create a string variable, we can do so by typing it as an array of characters. However, if we include string from the standard library, worry. We can use the string type instead. The real game changer though is the fact that c plus plus supports object oriented programming with classes. A class is just a blueprint for an object. Inside a class, you can define attributes and methods that will be private by default or make public by adding them under the public specifier. It's also possible to define methods outside the class definition using a double colon. Methods can also be defined multiple times with different parameters, which is known as overloading and is a form of polymorphism. In addition, we can define constructors and destructors learners to run code when an object is created or destroyed. Classes also support inheritance, allowing developers to more efficiently share logic throughout a program. To instantiate an object, type the class name followed by the name of your object, and optionally any parameters for the constructor. When it comes to memory, we could manage everything manually with pointers and references. However, tools like unique pointer can get the job done in a way that's easier and safer by ensuring that only one object can be allocated to learning. Now to run your code, open up the terminal and use a tool like Clang plus plus to compile it. This has been c+in100 seconds. Hit the like button and subscribe if you wanna see more short videos like this. Thanks for watching and I will see you in the next one.
C
c
plus
plus
plus
plus
a
a
statically
statically
typed
typed
compiled
compiled
programming
programming
language
language
famous
famous
for
for
its
its
widespread
widespread
use
use
in
in
software
software
infrastructure
infrastructure
and
and
infamous
infamous
for
for
its
its
steep
steep
learning
learning
curve.
curve
It
it
was
was
created
created
in
in
1979
1979
by
by
Bjorn
bjorn
Straustrup
straustrup
at
at
AT
at
and
and
T
t
Bell
bell
Labs.
labs
He
he
was
was
inspired
inspired
by
by
the
the
object
object
oriented
oriented
nature
nature
of
of
Simula,
simula
but
but
needed
needed
a
a
language
language
with
with
a
a
high
high
performance
performance
of
of
c,
c
and
and
thus,
thus
c
c
with
with
classes
classes
was
was
born.
born
It's
it's
designed
designed
as
as
a
a
superset
superset
of
of
c,
c
which
which
means
means
that
that
virtually
virtually
any
any
c
c
program
program
is
is
also
also
a
a
valid
valid
c
c
plus
plus
plus
plus
program,
program
but
but
it
it
also
also
adds
adds
0
0
overhead
overhead
abstractions,
abstractions
such
such
as
as
object
object
oriented
oriented
patterns
patterns
like
like
polymorphism,
polymorphism
encapsulation,
encapsulation
and
and
inheritance.
inheritance
Today,
today
it's
it's
used
used
in
in
a
a
wide
wide
variety
variety
of
of
systems
systems
with
with
constrained
constrained
memory
memory
demands,
demands
like
like
the
the
unreal
unreal
engine
engine
for
for
triple
triple
a
a
video
video
games,
games
programs
programs
like
like
Adobe
adobe
After
after
effects
effects
that
that
were
were
used
used
to
to
edit
edit
this
this
video,
video
databases
databases
like
like
MySQL
mysql
and
and
MongoDB,
mongodb
embedded
embedded
systems
systems
like
like
the
the
display
display
on
on
your
your
Smart
smart
Toaster,
toaster
and
and
is
is
used
used
to
to
implement
implement
much
much
of
of
low
low
level
level
infrastructure,
infrastructure
like
like
language
language
compilers
compilers
and
and
virtual
virtual
machines.
machines
It's
it's
so
so
popular
popular
because
because
it
it
provides
provides
low
low
level
level
memory
memory
and
and
hardware
hardware
control
control
like
like
c,
c
but
but
with
with
high
high
level
level
abstractions
abstractions
like
like
classes
classes
and
and
smart
smart
pointers.
pointers
C
c
plus
plus
plus
plus
makes
makes
it
it
harder
harder
to
to
shoot
shoot
yourself
yourself
in
in
the
the
foot,
foot
but
but
when
when
you
you
do,
do
it'll
it'll
blow
blow
your
your
whole
whole
leg
leg
off.
off
To
to
get
get
started,
started
install
install
a
a
c
c
plus
plus
plus
plus
compiler
compiler
like
like
GCC
gcc
or
or
Clang,
clang
then
then
create
create
a
a
file
file
ending
ending
in
in
cpp.
cpp
Include
include
iostream
iostream
from
from
the
the
standard
standard
library
library
to
to
handle
handle
input
input
and
and
output.
output
Your
your
code
code
will
will
start
start
executing
executing
from
from
the
the
main
main
function.
function
To
to
print
print
hello
hello
world,
world
we
we
simply
simply
use
use
standard
standard
character
character
output
output
followed
followed
by
by
the
the
bitwise
bitwise
shift
shift
left
left
operator
operator
and
and
a
a
string
string
literal.
literal
We
we
can
can
get
get
rid
rid
of
of
this
this
s
s
t
t
v
v
though
though
by
by
adding
adding
namespace
namespace
to
to
the
the
top
top
of
of
the
the
file.
file
Now,
now
if
if
we
we
want
want
to
to
create
create
a
a
string
string
variable,
variable
we
we
can
can
do
do
so
so
by
by
typing
typing
it
it
as
as
an
an
array
array
of
of
characters.
characters
However,
however
if
if
we
we
include
include
string
string
from
from
the
the
standard
standard
library,
library
worry.
worry
We
we
can
can
use
use
the
the
string
string
type
type
instead.
instead
The
the
real
real
game
game
changer
changer
though
though
is
is
the
the
fact
fact
that
that
c
c
plus
plus
plus
plus
supports
supports
object
object
oriented
oriented
programming
programming
with
with
classes.
classes
A
a
class
class
is
is
just
just
a
a
blueprint
blueprint
for
for
an
an
object.
object
Inside
inside
a
a
class,
class
you
you
can
can
define
define
attributes
attributes
and
and
methods
methods
that
that
will
will
be
be
private
private
by
by
default
default
or
or
make
make
public
public
by
by
adding
adding
them
them
under
under
the
the
public
public
specifier.
specifier
It's
it's
also
also
possible
possible
to
to
define
define
methods
methods
outside
outside
the
the
class
class
definition
definition
using
using
a
a
double
double
colon.
colon
Methods
methods
can
can
also
also
be
be
defined
defined
multiple
multiple
times
times
with
with
different
different
parameters,
parameters
which
which
is
is
known
known
as
as
overloading
overloading
and
and
is
is
a
a
form
form
of
of
polymorphism.
polymorphism
In
in
addition,
addition
we
we
can
can
define
define
constructors
constructors
and
and
destructors
destructors
learners
learners
to
to
run
run
code
code
when
when
an
an
object
object
is
is
created
created
or
or
destroyed.
destroyed
Classes
classes
also
also
support
support
inheritance,
inheritance
allowing
allowing
developers
developers
to
to
more
more
efficiently
efficiently
share
share
logic
logic
throughout
throughout
a
a
program.
program
To
to
instantiate
instantiate
an
an
object,
object
type
type
the
the
class
class
name
name
followed
followed
by
by
the
the
name
name
of
of
your
your
object,
object
and
and
optionally
optionally
any
any
parameters
parameters
for
for
the
the
constructor.
constructor
When
when
it
it
comes
comes
to
to
memory,
memory
we
we
could
could
manage
manage
everything
everything
manually
manually
with
with
pointers
pointers
and
and
references.
references
However,
however
tools
tools
like
like
unique
unique
pointer
pointer
can
can
get
get
the
the
job
job
done
done
in
in
a
a
way
way
that's
that's
easier
easier
and
and
safer
safer
by
by
ensuring
ensuring
that
that
only
only
one
one
object
object
can
can
be
be
allocated
allocated
to
to
learning.
learning
Now
now
to
to
run
run
your
your
code,
code
open
open
up
up
the
the
terminal
terminal
and
and
use
use
a
a
tool
tool
like
like
Clang
clang
plus
plus
plus
plus
to
to
compile
compile
it.
it
This
this
has
has
been
been
c+in100
c+in100
seconds.
seconds
Hit
hit
the
the
like
like
button
button
and
and
subscribe
subscribe
if
if
you
you
wanna
wanna
see
see
more
more
short
short
videos
videos
like
like
this.
this
Thanks
thanks
for
for
watching
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
The speaker explains the history and benefits of C plus plus, a programming language used in software infrastructure and infamous for its steep learning curve. C plus plus is a language with low performance and allows for object-oriented programming with classes and smart hardware control. It supports object-oriented programming with classes, but with high level reminded and overloading, making it harder to shoot oneself in the foot. The speaker recommends installing a C plus plusipped file and creating a file with i matter, and recommends using Clang plus plus to compile it.
C++ in 100 Seconds
C plus plus a statically typed compiled programming language famous for its widespread use in software infrastructure and infamous for its steep learning curve. It was created in 1979 by Bjorn Straustrup at AT and T Bell Labs. He was inspired by the object oriented nature of Simula, but needed a language with a high performance of c, and thus, c with classes was born. It's designed as a superset of c, which means that virtually any c program is also a valid c plus plus program, but it also adds 0 overhead abstractions, such as object oriented patterns like polymorphism, encapsulation, and inheritance. Today, it's used in a wide variety of systems with constrained memory demands, like the unreal engine for triple a video games, programs like Adobe After effects that were used to edit this video, databases like MySQL and MongoDB, embedded systems like the display on your Smart Toaster, and is used to implement much of low level infrastructure, like language compilers and virtual machines. It's so popular because it provides low level memory and hardware control like c, but with high level abstractions like classes and smart pointers. C plus plus makes it harder to shoot yourself in the foot, but when you do, it'll blow your whole leg off. To get started, install a c plus plus compiler like GCC or Clang, then create a file ending in cpp. Include iostream from the standard library to handle input and output. Your code will start executing from the main function. To print hello world, we simply use standard character output followed by the bitwise shift left operator and a string literal. We can get rid of this s t v though by adding namespace to the top of the file. Now, if we want to create a string variable, we can do so by typing it as an array of characters. However, if we include string from the standard library, worry. We can use the string type instead. The real game changer though is the fact that c plus plus supports object oriented programming with classes. A class is just a blueprint for an object. Inside a class, you can define attributes and methods that will be private by default or make public by adding them under the public specifier. It's also possible to define methods outside the class definition using a double colon. Methods can also be defined multiple times with different parameters, which is known as overloading and is a form of polymorphism. In addition, we can define constructors and destructors learners to run code when an object is created or destroyed. Classes also support inheritance, allowing developers to more efficiently share logic throughout a program. To instantiate an object, type the class name followed by the name of your object, and optionally any parameters for the constructor. When it comes to memory, we could manage everything manually with pointers and references. However, tools like unique pointer can get the job done in a way that's easier and safer by ensuring that only one object can be allocated to learning. Now to run your code, open up the terminal and use a tool like Clang plus plus to compile it. This has been c+in100 seconds. Hit the like button and subscribe if you wanna see more short videos like this. Thanks for watching and I will see you in the next one.
The speaker explains the history and benefits of C plus plus, a programming language used in software infrastructure and infamous for its steep learning curve. C plus plus is a language with low performance and allows for object-oriented programming with classes and smart hardware control. It supports object-oriented programming with classes, but with high level reminded and overloading, making it harder to shoot oneself in the foot. The speaker recommends installing a C plus plusipped file and creating a file with i matter, and recommends using Clang plus plus to compile it.

        [INST]
        You are youtuber called Fireship you make engaging high-intensity and entertaining coding tutorials and tech news. 
        you covers a wide range of topics relevant to programmers, aiming to help them learn and improve their skills quickly.
        
        Given the title of the video : C++ in 100 Seconds 
        and a small summary : The speaker explains the history and benefits of C plus plus, a programming language used in software infrastructure and infamous for its steep learning curve. C plus plus is a language with low performance and allows for object-oriented programming with classes and smart hardware control. It supports object-oriented programming with classes, but with high level reminded and overloading, making it harder to shoot oneself in the foot. The speaker recommends installing a C plus plusipped file and creating a file with i matter, and recommends using Clang plus plus to compile it.
        [/INST]
        
        Generate the video : C plus plus a statically typed compiled programming language famous for its widespread use in software infrastructure and infamous for its steep learning curve. It was created in 1979 by Bjorn Straustrup at AT and T Bell Labs. He was inspired by the object oriented nature of Simula, but needed a language with a high performance of c, and thus, c with classes was born. It's designed as a superset of c, which means that virtually any c program is also a valid c plus plus program, but it also adds 0 overhead abstractions, such as object oriented patterns like polymorphism, encapsulation, and inheritance. Today, it's used in a wide variety of systems with constrained memory demands, like the unreal engine for triple a video games, programs like Adobe After effects that were used to edit this video, databases like MySQL and MongoDB, embedded systems like the display on your Smart Toaster, and is used to implement much of low level infrastructure, like language compilers and virtual machines. It's so popular because it provides low level memory and hardware control like c, but with high level abstractions like classes and smart pointers. C plus plus makes it harder to shoot yourself in the foot, but when you do, it'll blow your whole leg off. To get started, install a c plus plus compiler like GCC or Clang, then create a file ending in cpp. Include iostream from the standard library to handle input and output. Your code will start executing from the main function. To print hello world, we simply use standard character output followed by the bitwise shift left operator and a string literal. We can get rid of this s t v though by adding namespace to the top of the file. Now, if we want to create a string variable, we can do so by typing it as an array of characters. However, if we include string from the standard library, worry. We can use the string type instead. The real game changer though is the fact that c plus plus supports object oriented programming with classes. A class is just a blueprint for an object. Inside a class, you can define attributes and methods that will be private by default or make public by adding them under the public specifier. It's also possible to define methods outside the class definition using a double colon. Methods can also be defined multiple times with different parameters, which is known as overloading and is a form of polymorphism. In addition, we can define constructors and destructors learners to run code when an object is created or destroyed. Classes also support inheritance, allowing developers to more efficiently share logic throughout a program. To instantiate an object, type the class name followed by the name of your object, and optionally any parameters for the constructor. When it comes to memory, we could manage everything manually with pointers and references. However, tools like unique pointer can get the job done in a way that's easier and safer by ensuring that only one object can be allocated to learning. Now to run your code, open up the terminal and use a tool like Clang plus plus to compile it. This has been c+in100 seconds. Hit the like button and subscribe if you wanna see more short videos like this. Thanks for watching and I will see you in the next one.
        