Hi, You cannot assign an CString object to a string. Every string assignment in .NET creates a new string on the garbage collector and recycles the old one. There is no global defined assignment operator for this available :(. You could try to write: strinEx = gcnew String(str); This makes no difference to the other assignment.
A
ariaci
@ariaci
Posts
-
CString to System::String + MFC Q -
comparison tool:cool: Try "Beyond Compare"! The best diff tool I've ever seen and the price is not too high. :) Download the free copy and give it a try www.scootersoftware.com