Fireship · @fireship

C++ in 100 Seconds

Uploaded February 7, 2022 · Length 2:46

C++ in 100 Seconds

Summary

C++ basics explained in 100 seconds, including its history, features, and usage in software infrastructure.

  • c++ basics
  • c++ programming language
  • object-oriented programming
  • c++ tutorial
  • c++ for beginners

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    C++ a statically typed compiled

  2. 0:03

    programming language famous for its

  3. 0:04

    widespread use in software

  4. 0:05

    infrastructure and Infamous for its

  5. 0:07

    steep learning curve it was created in

  6. 0:09

    1979 by bej Strauss at AT&T Bell Labs he

  7. 0:13

    was inspired by the object-oriented

  8. 0:15

    nature of simula but needed a language

  9. 0:17

    with a high performance of c and thus C

  10. 0:19

    with classes was born it's designed as a

  11. 0:21

    suet of C which means that virtually any

  12. 0:24

    c program is also a valid C++ program

  13. 0:27

    but it also adds zero overhead

  14. 0:28

    abstractions such as object-oriented

  15. 0:30

    patterns like polymorphism encapsulation

  16. 0:33

    and inheritance today it's used in a

  17. 0:35

    wide variety of systems with constrained

  18. 0:37

    memory demands like the Unreal Engine

  19. 0:38

    for AAA video games programs like Adobe

  20. 0:41

    After Effects that were used to edit

  21. 0:42

    this video databases like MySQL and

  22. 0:45

    mongodb embedded systems like the

  23. 0:47

    display on your smart toaster and is

  24. 0:48

    used to implement much of our low-level

  25. 0:50

    infrastructure like language compilers

  26. 0:52

    and virtual machines it's so popular

  27. 0:54

    because it provides low-level memory and

  28. 0:55

    Hardware control like C but with highle

  29. 0:58

    abstractions like classes and Mark

  30. 1:00

    pointers C++ makes it harder to shoot

  31. 1:02

    yourself in the foot but when you do

  32. 1:03

    it'll blow your whole leg off to get

  33. 1:06

    started install a C+ plus compiler like

  34. 1:09

    GCC or clang then create a file ending

  35. 1:11

    in CPP include IO stream from the

  36. 1:13

    standard library to handle input and

  37. 1:15

    output your code will start executing

  38. 1:17

    from the main function to print hello

  39. 1:19

    world we simply use standard character

  40. 1:20

    output followed by the bit y shift left

  41. 1:22

    operator and a string literal we can get

  42. 1:24

    rid of this STD though by adding a

  43. 1:26

    namespace to the top of the file now if

  44. 1:28

    we want to create a string variable we

  45. 1:30

    can do so by typing it as an array of

  46. 1:32

    characters however if we include string

  47. 1:34

    from the standard Library we can use the

  48. 1:36

    string type instead the real game

  49. 1:38

    changer though is the fact that C++

  50. 1:40

    supports object-oriented programming

  51. 1:41

    with classes a class is just a blueprint

  52. 1:44

    for an object inside a class you can

  53. 1:46

    Define attributes and methods that will

  54. 1:47

    be private by default or make them

  55. 1:49

    public by adding them under the public

  56. 1:51

    specifier it's also possible to Define

  57. 1:53

    methods outside the class definition

  58. 1:55

    using a double colon methods can also be

  59. 1:57

    defined multiple times with different

  60. 1:58

    parameters which is known as overloading