Link to home
Start Free TrialLog in
Avatar of vbal
vbal

asked on

system::string to stl string

I have an unmanaged class that accepts string arguments of std::string (STL).  I want to convert a managed string to a STL string, so that it can be passed to my unmanaged class.  

Example

String str;
std::string str1;

I want to convert str to str1

thanks in advance,
 vbal  
SOLUTION
Avatar of Svetlin_Panayotov
Svetlin_Panayotov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Svetlin_Panayotov
Svetlin_Panayotov

Oh sorry for my previous post - it converts std::string to managed..it was 7 in the morning here when I was reading your question :)
Avatar of vbal

ASKER

Thankyou, Dr. Richards, your solution works quite well.  Also Svetlin, even though you solution is the reverse, I found that I needed that as well.  So I will increase the total points to 250 and split the point allocation.

vbal