converting a String* to a std::string

Started by
0 comments, last by ChaosEngine 17 years, 9 months ago
in the .net enviroment is it possible to convert a String* to a std::string i need to do it so i can do an ofstream if anybody could help me i would appreciate it
Advertisement
it's possible but ugly...

String dotNetString;std::string cppString(static_cast<char*>(Marshal::StringToHGlobalAnsi(dotNetString).ToPointer()));


warned you it wasn't pretty!!
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

This topic is closed to new replies.

Advertisement