当前位置:网站首页>int GetMonth( ) const throw( );后面的throw( )什么意思?
int GetMonth( ) const throw( );后面的throw( )什么意思?
2022-07-05 21:04:00 【金士顿】
转载地址:https://blog.csdn.net/qq276592716/article/details/7625703
异常规范(Exception Specifications)
throw后面规定了该函数允许抛出什么类型的异常,空表示不抛出任何异常。这样写函数声明后,你在实现GetMonth时就不能有任何throw语句。
如果写为 int GetMonth( ) const throw(string);
函数实现时可以抛出string对象,其它类型的对象不允许。
边栏推荐
- 水泥胶黏剂BS 476-4 不燃性测试
- 第05章_存储引擎
- LeetCode: Distinct Subsequences [115]
- Determine the best implementation of horizontal and vertical screens
- Pytorch实战——MNIST数据集手写数字识别
- 启牛2980有没有用?开户安全吗、
- 基于flask写一个接口
- 2. < tag hash table, string> supplement: Sword finger offer 50 The first character DBC that appears only once
- Phpstudy Xiaopi's MySQL Click to start and quickly flash back. It has been solved
- ODPS 下一个map / reduce 准备
猜你喜欢

研學旅遊實踐教育的開展助力文旅產業發展

XML modeling

Analysis of steam education mode under the integration of five Education

Five layer network protocol

EN 438-7建筑覆盖物装饰用层压板材产品—CE认证

10000+ 代码库、3000+ 研发人员大型保险集团的研发效能提升实践

MySQL 千万数据量深分页优化, 拒绝线上故障!

第05章_存储引擎

Write an interface based on flask

PVC plastic sheets BS 476-6 determination of flame propagation properties
随机推荐
Traps in the explode function in PHP
R语言【数据管理】
SYSTEMd resolved enable debug log
10000+ 代码库、3000+ 研发人员大型保险集团的研发效能提升实践
ts 之 泛型
Pytoch practice -- MNIST dataset handwritten digit recognition
Sequence alignment
LeetCode: Distinct Subsequences [115]
Abnova CRISPR spcas9 polyclonal antibody protocol
The transformation based on vertx web sstore redis to realize the distributed session of vertx HTTP application
获取前一天的js(时间戳转换)
PVC 塑料片BS 476-6 火焰传播性能测定
实现浏览页面时校验用户是否已经完成登录的功能
AITM 2-0003 水平燃烧试验
【日常训练】729. 我的日程安排表 I
MYSQL IFNULL使用功能
php中explode函数存在的陷阱
MySQL InnoDB架构原理
How to renew NPDP? Here comes the operation guide!
示波器探头对测量带宽的影响