RichardUSTC

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年4月18日

摘要: C++异常处理的语法try{ ... throw aSomeException; ...}catch(SomeException e){ //code to handle the exception ... //optional rethrow throw; ...}或try{ ... //call a function that throws exception foo(); ...}catch(SomeException e){ //code to handle the exception ...}异常的特性:抛出异常如果没有被处... 阅读全文
posted @ 2013-04-18 17:13 RichardUSTC 阅读(216) 评论(0) 推荐(0) 编辑

摘要: 有时候经常需要写一些小的测试用例,有一个Makefile会比较方便。于是就想到写一个比较通用的Makefile。github地址:https://github.com/RichardUSTC/general-makefile这个Makefile的特点:支持C和C++程序每个C/C++源文件编译成一个可执行程序根据需要,可以通过make dump来dump出可执行程序的汇编代码,编译分析make时可以在命令行指定CC、CXX、CFLAGS、CXXFLAGS、LDFLAGS、LIBS、OBJDUMP和DUMP_FLAGS变量。例如make LIBS=-lpthread。注意这时等号两侧不能有空格编 阅读全文
posted @ 2013-04-18 17:02 RichardUSTC 阅读(652) 评论(0) 推荐(0) 编辑