Last active
November 29, 2018 20:49
-
-
Save AntonKueltz/91bbdb7e124ef3d8da4a8659f7c4c792 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// house.h | |
class House { | |
//copying a house doesn't make much sense so disallow use of copy functions | |
private: | |
House(const House&); // copy constructor | |
House& operator=(const House&); // copy assignment | |
}; | |
// main.cpp | |
int main(int argc, char * argv[]) { | |
House h1; | |
House h2(h1); // compiler error! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment