Skip to content

Instantly share code, notes, and snippets.

@domiyanyue
Created April 25, 2020 18:54
Show Gist options
  • Save domiyanyue/c2ea8d9c2d883b3191dbeaa019487d9c to your computer and use it in GitHub Desktop.
Save domiyanyue/c2ea8d9c2d883b3191dbeaa019487d9c to your computer and use it in GitHub Desktop.
class example error
class_example.cpp:6:5: error: ‘Owner’ does not name a type
Owner* my_owner;
^~~~~
class_example.cpp:8:19: error: ‘Owner’ has not been declared
void setOwner(Owner* owner){
^~~~~
class_example.cpp: In member function ‘void House::setOwner(int*)’:
class_example.cpp:9:9: error: ‘my_owner’ was not declared in this scope
my_owner = owner;
^~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment