Static Keyword in C | C++ For Java Devs Ep. 11

Sdílet
Vložit
  • čas přidán 17. 05. 2024
  • Join the Discord: / discord
    In this episode I go over the keyword static in C++ and its several different contexts. Unlike traditional programming languages, the static keyword can mean several different things depending on the way it is used in C++. I will go over the 3 ways that were carried over from C: Internal Linkage, "Static Member Functions", and Local Static Variables. Once we cover OOP I will cover the final use of the static keyword in C++ which is the traditional use of static in the OOP sense.
    0:00 In This Episode
    0:43 Dynamic Array Solution
    4:16 Internal Linkage
    7:17 Static Member Functions
    8:06 Local Static Variables
    9:31 Coding Internal Linkage
    14:32 Coding Static Member Functions
    16:23 Coding Local Static Variables
    18:04 Conclusion and Mini Challenge
    ---------------------------------------------------------------------
    Website: ambrosiogabe.github.io/
    Github: github.com/ambrosiogabe
    Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)
    My Recommended Game Engine Books:
    Game Engine Architecture: www.gameenginebook.com/
    Game Physics Cookbook (Read this before the next physics book): www.amazon.com/Game-Physics-C...
    Game Physics (Ian Millington): www.amazon.com/Game-Physics-E...
    Game Programming Patterns (Free): gameprogrammingpatterns.com/
    My Recommended Beginning Game Programming Books:
    JavaScript Game Design: www.apress.com/gp/book/978143...
    My Recommended Java Books:
    Data Structures/Algorithms: www.amazon.com/Data-Structure...
    LWJGL (Free, but I haven't read this thoroughly): lwjglgamedev.gitbooks.io/3d-g...

Komentáře • 8

  • @cxtpd
    @cxtpd Před 2 lety +1

    nice content man i enjoy watching this

  • @buggybaka
    @buggybaka Před 2 lety +4

    Hey gabe, this moght be extra work for you but... Instead of only openql can you make series on other libraries like sfml or sdl 2??

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety +1

      Hey CGO Clan, unfortunately I haven't used any of these frameworks so I probably won't be doing tutorials on them. But if I do learn them at any point I would definitely make a video on it :)

  • @matanmigdal7108
    @matanmigdal7108 Před 2 lety +1

    why not to use inline?

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety +2

      There's nothing wrong with the inline keyword, I was saying that you shouldn't use the static keyword instead of inline :)

  • @popbob4780
    @popbob4780 Před rokem +1

    Where did the next tutorial go xd?

    • @the-nomad-show
      @the-nomad-show Před 4 měsíci

      My question exactly! I've watched all 11 episodes, patiently waiting for the OOP episodes. Would really have loved to see a few of those. Now I'll have to find another tutorial which covers that. Won't be easy to find anyone as good a Gabe.