View Single Post
Old Dec 6, 2006 | 06:37 PM
  #2  
M@rshy's Avatar
M@rshy
٩(̾●̮̮̃̾•̃̾)۶
 
Joined: Aug 2004
Posts: 21,807
Likes: 0
Default

I read somewhere that if I use this:
Code:
std::string my_string = "Some text";
System::String* string = my_string.c_str();
it should work. However my string is in the private section of a class. Normally I would just go c.get_ans() and it would return the string.
I tried
Code:
 System::String* ans1 = c.get_ans().c_str();
but it still says "error C2440: 'initializing' : cannot convert from 'const char *' to 'System::String ^'"



Edit: Nobody knows C++? Damn...
Reply