This doesn't seem to behave as I would expect (as it does in matlab, for example). I want to execute a command, but give some readable output instead of the often very messy auto-generated error (index out of range or something).
try
{
MyFunction(1,2);
}
catch(char* str)
{
cout << "There was a problem." << endl;
}
Is that now how you do this in c++?
Thanks,
Dave