#include <iostream>
using namespace std;
class student
{
private:
	int num;
	char name[20];
	char sex;
public:
	void display()
	{
		cout<<"num"<<num<<endl;
		cout<<"name:"<<name<<endl;
        cout<<"sex: "<<sex<<endl;
	}
};
student stud1,stud2;                                //定义student类的两个对象stud1,stud2
int main()
{
	cout<<"定义对象方法2"<<endl;
	return 0;
}
