mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-03-19 19:35:17 +08:00
fix: correct inheritance typo in sizeof example
Fix typo where C1 should inherit from A1 instead of A
This commit is contained in:
@@ -49,7 +49,7 @@ class C {
|
||||
class A1 {
|
||||
virtual void fun() {}
|
||||
};
|
||||
class C1 : public A {};
|
||||
class C1 : public A1 {};
|
||||
|
||||
int main() {
|
||||
cout << sizeof(A) << endl; // 8
|
||||
|
||||
Reference in New Issue
Block a user