September 2018
Intermediate to advanced
328 pages
9h 10m
English
There's no header file associated with main.cpp because its only purpose is to act as an entry point to the application. In fact, the file is only seven lines long:
#include "game.h"int main() { Game game; while (game.loop()); return 0;}
The while statement is exited when the loop() function returns false, which occurs when the SDL_QUIT event fires. All this file is doing is creating a new instance of Game and starting the loop. That's it for the codebase; let's start porting!
Read now
Unlock full access