I have a listBox in Visual C++ 2008, and I want the first line convert to string. So first, I select the first line
listBox1->SetSelected( 0, true );
And afterwards, I want to convert it to string
string t = listBox1->SelectedItems[ 0 ];
Which results in an error:
error C2440: 'initializing' : cannot convert from 'System::Object ^' to 'std::basic_string<_Elem,_Traits,_Ax>'
How can I convert it?