#include <iostream>
using namespace std;
int main()
{
try
{
int momsage = 30;
int sonsage = 34;
if(sonsage > momsage)
{
throw 99;
}
}
catch(int x)
{
cout << "son can not be older, error " << x << endl;
}
}
网友评论