post lecture 2-2

This commit is contained in:
2022-03-16 14:53:27 -05:00
parent 5368ae466e
commit 1b8c7458a5
3 changed files with 51 additions and 6 deletions

View File

@@ -2,9 +2,15 @@ using namespace std;
class Dog {
public:
Dog(int age, int namelength, char * name);
~Dog();
int age;
int namelength;
char * name;
Dog(int age, int namelength, char * name);
Dog(const Dog& from);
~Dog();
Dog& operator=(const Dog& rhs);
char operator[](int index) const;
char& operator[](int index);
friend ostream& operator<<(ostream& os, const Dog& d);
private:
int age;
int namelength;
char * name;
};