-
-
Save rightfold/34df7551a50764d4d34f to your computer and use it in GitHub Desktop.
This file contains 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
class Car { | |
public: | |
explicit Car(int type) : speed(0), type(type) { } | |
int speed; | |
private: | |
int type; | |
}; | |
class Human { | |
public: | |
Human() : car(1) { } | |
Car car; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment