logoalt Hacker News

tialaramex • today at 3:05 PM • 1 reply • view on HN

C++ "class" is the exact same user-defined type as C++ "struct" but with different defaults for privacy.


Replies

ahartmetz • today at 8:15 PM

But C++ "struct" has many more features than C "struct". Virtual functions aka compiler-generated invisible vtables, constructors (initialization functions) and destructors (automagically called deinitialization functions), the whole templates complex of features...