Main()

So I’ll start by embarrassing myself and saying I took one semester of python a few years back, so I get to say I know something, but I’m probably wrong. I’m pretty positive it’s a function and almost positive it is a required line of code in all c++ programs, if I’m correct that it’s a function, then you sort of pick what it does, but I’m guessing it’s used more generically to boot a C++ program by calling another arbitrary function. I’m unsure tho.

basically yeah. main() simply acts as an entry point in a c++ program so the execution of your program will start there.

I think the main()'s purpose is to:

  • input and set the minimum and maximum difficulties the game will include (which is the main purpose of the game - to beat the varying levels in it)
  • Display the victory message that would pop up each time the player succeeds in each level
  • Perhaps input the time it should take to load the next level (buffer time)

To conclude, I think it is function that allows us to create the main aspects that the player will experience.

Privacy & Terms