当前位置:网站首页>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对象,其它类型的对象不允许。
边栏推荐
- vant 源码解析之 utils/index.ts 工具函数
- Five layer network protocol
- Abbkine trakine F-actin Staining Kit (green fluorescence) scheme
- 浅聊我和一些编程语言的缘分
- The development of research tourism practical education helps the development of cultural tourism industry
- 学习机器人无从下手?带你体会当下机器人热门研究方向有哪些
- XML modeling
- PVC plastic sheets BS 476-6 determination of flame propagation properties
- Aitm2-0002 12s or 60s vertical combustion test
- Clear app data and get Icon
猜你喜欢
第05章_存储引擎
研學旅遊實踐教育的開展助力文旅產業發展
Abnova fluorescent dye 620-m streptavidin scheme
Five layer network protocol
CLion配置visual studio(msvc)和JOM多核编译
MySQL fully parses json/ arrays
Add ICO icon to clion MinGW compiled EXE file
产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
最长摆动序列[贪心练习]
When steam education enters personalized information technology courses
随机推荐
学习机器人无从下手?带你体会当下机器人热门研究方向有哪些
Simple getting started example of Web Service
【案例】元素的显示与隐藏的运用--元素遮罩
10000+ 代码库、3000+ 研发人员大型保险集团的研发效能提升实践
启牛2980有没有用?开户安全吗、
最长摆动序列[贪心练习]
Write an interface based on flask
Viewrootimpl and windowmanagerservice notes
Influence of oscilloscope probe on signal source impedance
Sophomore personal development summary
MySQL 千万数据量深分页优化, 拒绝线上故障!
POJ 3414 pots (bfs+ clues)
Sequence alignment
XML modeling
获取前一天的js(时间戳转换)
Prior knowledge of machine learning in probability theory (Part 1)
Implementation of redis unique ID generator
Establishment of terminal security capability verification environment and penetration test records
Clear app data and get Icon
2. < tag hash table, string> supplement: Sword finger offer 50 The first character DBC that appears only once