The main thing C needs from C++ is object destructors and RAII. It would be easy to denote a function as the cleanup operator for a struct, and the compiler already knows when variables go out of scope, valuable information that is currently not used for much. auto/shared pointers would save a lot of memory management pain in C.
Also function templates that would allow such things as a fast generic sort routine without lots of function pointer dereferences would be nice.
Also function templates that would allow such things as a fast generic sort routine without lots of function pointer dereferences would be nice.
There's nothing else in C++ i can't live without.