摘要:
(一)默认调用的无参构造函数#include<iostream>#include<string>using namespace std;class StudentID{ int value;public: StudentID(){ static int nextStudentID = 0; value = ++nextStudentID ; cout<<"Assigning student id "<<value<<endl; }};class Student{ string name; StudentID id; 阅读全文
posted @ 2012-09-18 20:47
Rookie_h
阅读(214)
评论(0)
推荐(0)
浙公网安备 33010602011771号