Const-correctness in C++ is still giving me headaches. In working with some old C code, I find myself needing to assign turn a C++ string object into a C string and assign i
There's always const_cast...
std::string s("hello world"); char *p = const_cast(s.c_str());
Of course, that's basically subverting the type system, but sometimes it's necessary when integrating with older code.