fix: correct inheritance typo in sizeof example

Fix typo where C1 should inherit from A1 instead of A
This commit is contained in:
Francis
2026-03-12 23:46:47 +08:00
committed by GitHub

View File

@@ -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