This is going off of complete guesswork and no previous knowledge of C++, so here goes hahaha.
I think main() has something to do with the bulk of what is happening in that section of code. So in relation to the secret agent game mentioned in this section, perhaps main() refers to the “You need to crack the code to get in” and than it possibly runs a code to decide what it will ask of the player and what the required answer is.
Hopefully I’m not too off haha