C++ in 100 Seconds

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
c plus plus a statically typed compiled programming language famous for its widespread use and software infrastructure and infamous for its steep learning curve it was created in 1979 by bjorn strausstrup at at 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 zero 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 aaa 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 our 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 compiler like gcc or clang then create a file ending in cpp include io stream 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 std though by adding a 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 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 them 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 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 memory now to run your code open up the terminal and use a tool like clang plus plus to compile it this has been c plus in 100 seconds hit the like button and subscribe if you want to see more short videos like this thanks for watching and i will see you in the next one
Info
Channel: Fireship
Views: 1,110,972
Rating: undefined out of 5
Keywords: webdev, app development, lesson, tutorial
Id: MNeX4EGtR5Y
Channel Id: undefined
Length: 2min 45sec (165 seconds)
Published: Mon Feb 07 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.