How to access variables from another class in C++

Can you show me the code you wrote that caused this error?