What is BCGame?

The line “FBullCowGame BCGame;” causes me confusion. My confusion stems from the fact that BCGame does not exist within FBullCowGame.h… Where is it coming from? If it isn’t a method from FBullCowGame, then what exactly is it? If it’s just the name given to a new game… Then why do we need to call it from FBullCowGame, rather than make it a variable or something located within main.cpp? Struggling to understand how it’s not giving an error, trying to call a method that doesn’t exist from FBullCowGame.h :disappointed_relieved:

I don’t fully understand it either but as far as BCGame is concerned I believe we just initialized another variable. Just like how we did string Guess; except in this case we are using fBullCowGame as our type and BCGame as the variable. Just remember that string came from somewhere. When we started and had a blank slate the type string wouldn’t work until we brought up using namespace std; so string is coming from the standard namespace just like fBullCowGame is coming from our header file. BCGame is just a variable like Guess. Hope this helps somewhat.

1 Like

Privacy & Terms