文件名称:21-8
介绍说明--下载内容均来自于网络,请自行研究使用
/* 范例:21-8 自定义例外类 */
当读者输入y的数值是0的话将会发生异常,并激活异常处理类
程序执行结果﹕
Project p21-8.exe raised exception class DividByZero with message Exception Object Address: 0x69346A . Process stopped. Use Step or Run to continue.
Please Input Two Numbers,i除以j, i/j:
5
0
算数异常,x不能除以0,这是自定义异常类!
按Enter键继续...
-/* Example :21-8 custom exception class*/When readers enter the y value is 0, then there will be abnormal, and abnormal activation of procedures to deal with the results of the implementation type: Project p21-8.exe raised exception class DividByZero with message Exception Object Address: 0x69346A. Process stopped. Use Step or Run to continue.Please Input Two Numbers, i divided by j, i/j: 50 count abnormal, x can not be divided by 0, this is a custom exception classes! press Enter key to continue. ..
当读者输入y的数值是0的话将会发生异常,并激活异常处理类
程序执行结果﹕
Project p21-8.exe raised exception class DividByZero with message Exception Object Address: 0x69346A . Process stopped. Use Step or Run to continue.
Please Input Two Numbers,i除以j, i/j:
5
0
算数异常,x不能除以0,这是自定义异常类!
按Enter键继续...
-/* Example :21-8 custom exception class*/When readers enter the y value is 0, then there will be abnormal, and abnormal activation of procedures to deal with the results of the implementation type: Project p21-8.exe raised exception class DividByZero with message Exception Object Address: 0x69346A. Process stopped. Use Step or Run to continue.Please Input Two Numbers, i divided by j, i/j: 50 count abnormal, x can not be divided by 0, this is a custom exception classes! press Enter key to continue. ..
(系统自动生成,下载前可以参看下载内容)
下载文件列表
21-8.txt