Section 2: Triple X - Write pure C++ / Main Function explanation

Hello, My name is Ken. I live in Texas, U.S.A. This is my first time in the community.

This is what I think the main function is doing: I have experience with javascript but no C++

“int LevelDifficulty” sets a variable for the iteration,
“int const MaxDifficulty” sets the ceiling for the iteration function,
“while” tells the function to run so long as the iteration has not reached the ceiling,
“boolean” checks the current iteration to the ceiling and allows the level to be tried again by clearing the incorrect input and the cache through “cin.clear” and “cin.ignore”
the “if” statement allows the level to increment if the level is complete.

I think that’s pretty much it.

Privacy & Terms