I’m having the hardest time converting CString’s to std::strings. I have some filename paths that i need converted to strings, and I’m also trying to verify that they converted correctly by printing on the command line by using:
RhinoApp().Print( L"The converted string is %s \n",convertedToString.c_str());
where convertedToString is a std::string.
Can someone help me here? I just want to be able to work with strings instead of CStrings. I am in a unicode environment
Maybe if I knew how to use ON_wString’s or CStrings as global variables, i would use them instead of strings. However, I’m not sure what library to include in order to user CStrings or ON_wStrings. Essentially, I have some extern string variables because I need access to them accross several functions/classes. I dont know how to define these extern variables as ON_wStrings or CStrings without causing errors since I don’t have the necessary libraries included in that header file. Much of this is because I’m not an expert programmer. Would be great if you gave me some pointers here. If I could just work with CStrings or ON_wStrings, that would be easier.