This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#ifndef WORKA_H
#define WORKA_H
#include <string>
#include <iostream>
using namespace std;
class MyClass
{
private:
string id; //id
int age;
string phone;
public:
MyClass() { //构造函数
id = string("empty id");
age = 20;
phone = string("13684598216");
}
MyClass(string id, int age, string phone) { //构造函数
this->id = id;
this->age = age;
this->phone = phone;
~MyClass() { //析构函数
void Print() { //输出函数
cout << "id是:";
cout << id << endl;
cout << "age是:";
cout << age << endl;
cout << "phone是:";
cout << phone << endl;
};
#endif