注意:此页面搜索的是所有试题
题目内容
(许昌学院面向对象程序设计)
[分析题,4分] class Student { int studentNo; static int count; public: Student() { count++;StudentNo=count;} void print(){ cout<<StudentNo<<endl; }};int Student::count=0;main(){ Student student1; student1.print(); Student student2;student2.print();student *p;p= new Student;p->print();}
参考答案