Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Dog
- {
- public:
- Dog();
- string Name;
- int Age;
- float Health;
- void Bark();
- };
- int main()
- {
- Dog Spot;
- system("pause");
- }
- Dog::Dog()
- {
- Bark();
- Name = "Fido";
- Age = 10;
- Health = 100.f;
- }
- void Dog::Bark()
- {
- cout << "woof" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment