How to use a member variable as a default argument in C++?
Default argument expressions for a member function can only depend on things that are in class or global scope. The default argument also has to be specified in the method’s declaration (i.e. in the header file). To get around this, you need 2 overloads of your MoveTo method. One that takes 1 argument, and another … Read more