The main function of the code I believe is the name given of the function. The function is to set up the game, it gives us the difficulty and max difficulty then states that while the game’s difficulty is less than or equal to 10 (The game’s max difficulty), then another function will run that tells the computer to play the game, then increase the difficulty. After this is done and all levels are beaten, the computer will send a message saying “WOW - You’re a master hacker”, it then exits the code.
1 Like
Great. In C++, the main function is the starting point for all applications. Even Unreal has a main function buried in the source code somewhere.
Welcome to the course and I hope you enjoy it.