Wednesday, May 30, 2007

C++: convert managed clr System::String^ to std::string

#include vcclr.h

System::String^ line = "a managed string";
pin_ptr wch = PtrToStringChars( line );
int len = (( line->Length+1) * 2);
char *ch = new char[ len ];
wcstombs( ch, wch, len );
string lineStr = ch;
delete ch;

Loneliness

You can check your Loneliness level using the Loneliness Scale UCLA (psytests.org) If you are   dealing with feelings of loneliness   that j...