Y
Hacker News
new
|
ask
|
show
|
jobs
by
hasenj
3218 days ago
Don't C++ classes (and therefore structs) have a hidden vtable?
2 comments
plq
3218 days ago
vtable is always "hidden". It's only there when there is at least one virtual member defined. Sole difference between class and struct in C++ is default visibility.
class A { int a; // private } struct A { int a; // public }
link
taejo
3218 days ago
Only if they have virtual members.
link