MCPcopy Create free account
hub / github.com/ShiqiYu/CPP / Student

Class Student

week12/examples/virtual.cpp:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22};
23
24class Student: public Person
25{
26 public:
27 string id;
28 Student(string n, string i): Person(n), id(i){}
29 void print()
30 {
31 cout << "Name: " << name;
32 cout << ". ID: " << id << endl;
33 }
34};
35
36void printObjectInfo(Person & p)
37{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected