Why we don't pass the HiddenWord variable into the functions?

Hey, I’m almost at the end of the Bulls & Cows section. I just realized that we don’t pass in HiddenWord variable into the functions. Do you know why is that? Here are some examples:

Because it’s a member variable. It’s accessible to all member functions as it’s part of the class.

Now that makes sense. Thank you so much for answering me.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms