c++中有两种方法定义类的对象:
1,
class 类名
{
成员变量表列;
成员函数表列;
}对象名表列;‘
2,
类名 对象1, 对象3, 。。。。。;
class My_class
{
char *str;
int MaxLen;
public:
My_class(char*)
{
str = new char[MaxLen];
}
~My_class()
{
delete str;
}
void GetString(char *);
};