异常处理的代码编译问题
#include<iostream>
#include<stdlib.h>
using namespace std;
#include"IndexException.h"
void test()
{
throw 10;
}
int main (void)
{
try
{
test();
}
catch (CMemoryException *e)
{
cout << "Exception" << endl;
}
system("pause");
return 0;
}和老师讲的一样,但是会提示错误