diff options
added new examples
1 files changed, 18 insertions, 0 deletions
| -rw-r--r-- | Big4_and_inheritance/Students/User.h | 18 |
diff --git a/Big4_and_inheritance/Students/User.h b/Big4_and_inheritance/Students/User.h new file mode 100644 index 0000000..400057b --- /dev/null +++ b/Big4_and_inheritance/Students/User.h @@ -0,0 +1,18 @@ +#pragma once + +#include <iostream> +using namespace std; +class User +{ +private: + char* name; + int age; + void CopyFrom(const User& other); + void Free(); +public: + //User(); + User(const char*name, int age); + User(const User& other); + User& operator=(const User& other); + ~User(); +}; |
