类的定义:
类是一种抽象数据类型(当然也有具体的类,如pair)
class Person
{
public:
Person(string pName,string pAddress)
{
name=pName;
address=pAddress;
}
virtual ~Person()
{}
private:
string name;
string address;
protected:
string out(Person c) const
{
return c.name;
return c.address;
}
};