Hello a couple of questions on VC++.NET strings
I have a managed class and I want to create a private string member, TCHAR szMyString;
coming from VC++, my preferred ctring type is TCHAR. How can I use this in VC++.NET
public __gc class USBEnum
{
private:
static bool bDebug = true;
TCHAR szMyString; //Gives me an error
}
The above code doen't work, Can anyone tell me why and how to fix it.
Also how can I use the _T macro and how in VC++.NET. So that I can convert my program to unicode easily if required later.
Also what is the best way to output strings to the debug window. I used to use TRACE() with MFC but its not in VC++.NET and I don't think Debug::WriteLine is as good as it does not allow for format specifiers in the string. And I think that the Debug::WriteLine aren't skipped by the compiler in a release build like with TRACE() statements. Any suggestions on how this is done in VC++.NET
Start Free Trial