I’m currently learning C++/CX, with Windows Universal App, and I want to show a caught exception message in a MessageDialog
, however, C++/CX works in a way that I don’t understand, in that I can't convert a char*
into a string
type, which is what the MessageDialog
expects as input.
catch (const std::invalid_argument ex)
{
MessageDialog^ ErrorBox = ref new MessageDialog(ex.what());
ErrorBox->ShowAsync();
}
I hope you can help me.