Non-OO features that C++ has that C does not:
- Templates
- Function overloading
- References
- Namespaces
- You can use
struct
s andenum
s without writingstruct
orenum
before every declaration or using typedefs. - Even if you don’t define your own classes, using C++’s string and container classes is still often more convenient and safe to work with than c-style strings and arrays.
- Type safety (even though some would call it weak)
- Exceptions
- Variable declarations in conditionals, C99 only has it in
for