#include <iostream>
class dog {
private:
bool gender;
int age;
public:
dog(bool gender,int age){
this->gender = gender;
this->age = age;
}
std::string GetGender(){
if (this->gender) {
return "Men";
} else {
return "Women";
}
}
int GetAge(){
return this->age;
}
};
int main() {
dog aho(true,90);
std::cout << aho.GetAge() << std::endl;
std::cout << aho.GetGender() << std::endl;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: