C++/Game Tutorial 16: Separate Files And Constructors! @makinggameswithben
C++/Game Tutorial 16: Separate Files And Constructors!  @makinggameswithben
Uploaded June 2014 | Updated September 2026, 2 weeks ago
In this episode I will teach you how to put your classes in separate files, and how to use constructors to initialize your class!

Helpful explanation by +Paulo F:
" HEADERS (*.h or *.hpp files) are commonly used for a class's prototype (think "layout"), this includes function names and members (inner variables) that lays out how you want that class to work. IMPLEMENTATION FILES (namely *.cpp files) as the name implies are expected to contain that prototype's implementation, and it's a good practice to include dependencies only on *.cpp files because we only need them when we're actually implementing things. Just think about it: if a header holds only the layout, and won't actively implement functional code, why would I need to include other dependencies (such as libraries like iostream) in there? It's a prototype. Prototype != Implementation, hold to this forever. #HumbleNote "

Twitter: twitter.com/ChillstepCoder
Seed Of Andromeda Channel: youtube.com/user/DubstepCoder
Seed Of Andromeda Website: seedofandromeda.com
C++/Game Tutorial 16: Separate Files And Constructors!Advanced C++/Graphics Tutorial 8: GLSLProgram, Initialization Lists, extern!C++/Game Tutorial 27: new, delete, and delete[]Advanced C++/Graphics Tutorial 36: Cache-FriendlinessAdvanced C++/Graphics Tutorial 14: Maps, Binary Search, Caching!Advanced C++/Graphics Tutorial 47: Platformer Player ControlAdvanced C++/Graphics Tutorial 53: GUI class and static_castAdvanced C++/Graphics Tutorial 43: Multiple Renderers, Lazy InitAdvanced C++/Graphics Tutorial 37: ParticleEngine2D!C++/Game Tutorial 38: Game States, enums, enum Classes!Cmake and Vcpkg C++ Project SetupC++/Game Tutorial 17: Vectors!
MakingGamesWithBen |

C++/Game Tutorial 16: Separate Files And Constructors!

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER