#include using namespace std; typedef const char * String; typedef unsigned short ushort; class Person{ public: String Name; Person(String name):Name(name){} }; class Student:public Person{ public: float CGPA; Student(String name, float cgpa):Person(name),CGPA(cgpa){ } //Student():Name(""),CGPA(0.0F){ Student():Student("",0.0F){ } }; class Staff:public Person{ public: double Salary; Staff(String name, double salary):Person(name),Salary(salary){ } }; class Lecturer:public Staff{ public: float Allowance; Lecturer(String name, double salary, float allowance): Staff(name,salary),Allowance(allowance){ } }; class Clerk:public Staff{ public: ushort OTHours; float OTRate; Clerk(String name, double salary, float otRate): Staff(name,salary),OTRate(otRate){ OTHours = 0; } }; int main(){ Student s1("Tong Sam Pah",3.7F); Student *ps = new Student("Yong Tau Foo", 2.8F); ps->CGPA = 3.1F; ps[0].CGPA = 3.2F; Student *pss = new Student[5]; delete[] pss; delete ps; return 0; }