#include<iostream>
#include<cstdlib>
#include <string>
using namespace std;
class Student
{
private:
string name;
int numClasses;
string *classList;
public:
Student();
void InputData();
void OutputData();
void ResetClasses();
Student& operator =(const Student& rightSide);
~Student();
};
Student::Student():numClasses(30), name(0)
{
classList = new string;
}
void Student::InputData()
{
cout <<"請輸入學生姓名: ";
cin >>name;
cout <<"總共修幾個科目呢? ";
cin >>numClasses;
cout <<"請輸入"<<numClasses<<"個科目名稱"<<endl;
for(int i=0; i<numClasses; i++)
{
cout<<"=====第"<<i+1<<"個科目====="<<endl;
cin >> numClass ..
訪客只能看到部份內容,免費 加入會員 或由臉書 Google 可以看到全部內容