#include <iostream>
#include <exception>
using namespace std; //继承自带的异常
class sizeerror :public exception
{
public:
sizeerror() :exception("尺寸大小异常")
{ } const char *what()
{
char *p = "尺寸大小异常";
cout << "尺寸大小异常" << endl;
return p;
}
}; class print3d
{
public:
print3d(double size)
{
if (size > )
{
throw &sizeerror();
}
}
};
void main()
{
try
{
print3d p();
}
catch (sizeerror *p)
{
p->what();
}
cin.get();
}

最新文章

  1. 【转】ubuntu下最好用的输入法fcitx-sunpinyin
  2. AE开发能否实现TOC Control里添加多个Data Frame
  3. Windows平台下PHP环境搭建
  4. linux下配置ssledge代理服务器
  5. XMl的解析
  6. android gallery 自定义边框+幻灯片
  7. WCF的行为与异常-------配置文件说明
  8. [Webpack 2] Grouping vendor files with the Webpack CommonsChunkPlugin
  9. Android - This Handler class should be static or leaks might occur.
  10. [ERROR] Unknown/unsupported storage engine: InnoDB
  11. PHP学习笔记-3
  12. 【leetcode81】Product of Array Except Self
  13. 关于maven项目的servlet-api的问题
  14. c# 数据存储过程
  15. [luogu P1552] [APIO2012]派遣
  16. SQL SERVER 2008自动发送邮件(完整版)
  17. 使用用WCF中的双工(Duplex)模式将广告图片推送到每个Winform客户端机子上
  18. 设计模式19:Chain Of Responsibility 职责链模式(行为型模式)
  19. Python 邮件发送消息
  20. SpringBoot13 利用mybatis-plus自动生成entity、dao、service、controller

热门文章

  1. Ubuntu 16.04 安装 Wireshark分析tcpdump的pcap包——sudo apt install wireshark-qt
  2. poj--1236--Network of Schools(scc+缩点)
  3. Oracle RAC 全局等待事件 gc current block busy 和 gc cr multi block request 说明--转载(http://blog.csdn.net/tianlesoftware/article/details/7777511)
  4. Python使用functools模块中的partial函数生成偏函数
  5. C#.NET编码规范
  6. PHP 导出excel 数据量大时
  7. 关于requestAnimationFrame()和cancelAnimationFrame()与定时器之间的比较
  8. Android 对ScrollView滚动监听,实现美团、大众点评的购买悬浮效果
  9. SQL Server的复合索引学习【转载】
  10. Android回炉系列之四大组件之首Activity