4 ms·
Yes, it is easy to go back and forth between std::string and char* using the std::string constructor and ::c_str(). The "nightmare" part is that when interactin
by vortico 8y ago
Yes, it is easy to go back and forth between std::string and char* using the std::string constructor and ::c_str(). The "nightmare" part is that when interacting with C from C++, you can never work with the internal std::string data, so you have to manage copies of buffers and copy it back into a std::string every single time you interact with C functions. It's really nasty to look at in large quantities.
- TimJYoung 8y agoAhhh, okay, now I see the objection. Object Pascal allows you to use them interchangeably as you see fit with simple typecasts.