| ▲ | ape4 6 hours ago |
| Exactly. Many years ago people used to use C `struct` for objects but then that was formalized as `class`. |
|
| ▲ | tialaramex 5 hours ago | parent [-] |
| C++ "class" is the exact same user-defined type as C++ "struct" but with different defaults for privacy. |
| |
| ▲ | ahartmetz 17 minutes ago | parent [-] | | 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... |
|