Preprocessor Directives | C++ For Java Devs Ep. 4
Join the Discord: https://discord.gg/4tHeAkxNg7
In this episode I go over the most common preprocessor directive and some common use cases for each. These are directives that programmers will typically write that the compiler uses during preprocessing. These can include things like conditional compilation (where some Mac code is not compiled on Windows or vice versa), replacing common pieces of code with a function like macro, or creating useful logging macros that display information about where the function was called.
Logger Solution: https://gist.github.com/codingminecraft/62d88eddfd670dbef257fe173609d83a
0:00 In This Episode
0:56 Macros
3:06 Macro Functions
5:12 Variadic Arguments in Macros
7:11 Macro Concatenation
9:46 Raw String Concatenation
11:06 If/Else Directives
15:18 Special Preprocessor Variables
17:26
---------------------------------------------------------------------
Website: https://ambrosiogabe.github.io/
Github: https://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: https://www.gameenginebook.com/
Game Physics Cookbook (Read this before the next physics book): https://www.amazon.com/Game-Physics-Cookbook-Gabor-Szauer/dp/1787123669
Game Physics (Ian Millington): https://www.amazon.com/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768
Game Programming Patterns (Free): https://gameprogrammingpatterns.com/
My Recommended Beginning Game Programming Books:
JavaScript Game Design: https://www.apress.com/gp/book/9781430247166
My Recommended Java Books:
Data Structures/Algorithms: https://www.amazon.com/Data-Structures-Algorithms-Java-6th-ebook/dp/B00JDRQF8C
LWJGL (Free, but I haven't read this thoroughly): https://lwjglgamedev.gitbooks.io/3d-game-development-with-lwjgl/content/