Chapter14ExceptionHandling课程.pptVIP

  • 1
  • 0
  • 约6.6千字
  • 约 27页
  • 2016-12-04 发布于江苏
  • 举报
Chapter 14 Exception Handling §14.1 Basics §14.2 Exception Classes §14.3 Multiple Catches §14.4 Exception Propagation and Rethrow §14.5 Exception Specification * §14.1 Basics Listing 14.1: to read in two integers and displays their quotient * Quotient Run int main(){ cout Enter two integers: ; int num1, num2; cin num1 num2; cout num1/num2 is (num1 / num2) endl; return 0; } If you enter “0” for num2, then? A runtime error! Exception: the situation/condition that may cause a program can’t terminate normally. Naive Exception Handling Listing 14.2: Adding an if statement to te

文档评论(0)

1亿VIP精品文档

相关文档