C++教程:C++抽象类与纯虚函数

2020-01-06 12:29:04丽君

      name[i]=n[i]; 
   }
   name[i]='';
   age=a;
   height=h;
   weight=w;
   return;
}
student::student(char *n,int a,int h,int w)
{
   cout <<"Constructing a student with parameter..." <<endl;
   set(n,a,h,w);
}
student::student()
{
   cout <<"Constructing a student without parameter..." <<endl;
}
//undergraduate.h和pupil.h同程序17.7.1
//main.cpp
#include <iostream>