Я только что перехожу в C ++ от C, и в настоящее время набираю свой путь через исключения.#include /* I/O */
#include /* exception */
#include /* stdlib */
using namespace std;
void Bar()
{
throw exception();
}
void Foo()
{
int *ip = new int;
try
{
Bar();
}
catch(exception &e)
{
cerr
Подробнее здесь: https://stackoverflow.com/questions/614 ... exceptions