MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / main

Function main

base_code/virtual.cpp:49–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49int main()
50{
51 // 虚函数的调用取决于指向或者引用的对象的类型,而不是指针或者引用自身的类型
52 Employee *emp[] = {new Manager(), new Engineer};
53 globalRaiseSalary(emp,2); // 100 200
54 return 0;
55}

Callers

nothing calls this directly

Calls 1

globalRaiseSalaryFunction · 0.85

Tested by

no test coverage detected