For loop with a global scope constant

UnrealCourse-Lec26
Hey everyone!
The for loop was pretty straightforward. The only caveat was that I created a new constant called NUM_GUESSES to be the limit of iterations we will need.

I really have the hunch that these constants will be used in several functions, therefore I have placed outside all of them outside of main or any other function. I guess this is called “making the variables have global scope”, and it means that they will be available to any function to use, instead of being available only inside of one function.

But anyway that has not been necessary so far, and I’m not sure if it has any bad side effects…

I’ll see you ahead in the course! :smiley:

Privacy & Terms