博客园  :: 首页  :: 新随笔  :: 订阅 订阅  :: 管理

2013年2月18日

摘要: 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 5 int main() { 6 string strA = "Copy on write"; 7 string strB = strA; 8 string strC = strA; 9 printf("strA: %p\r\n", strA.c_str());10 printf("strB: %p\r\n", strB.c_str());11 printf("strC 阅读全文

posted @ 2013-02-18 22:17 扬名 阅读(915) 评论(0) 推荐(1) 编辑

摘要: 当程序崩溃的时候怎么办 PART-1当程序崩溃的时候怎么办 PART-2 阅读全文

posted @ 2013-02-18 21:07 扬名 阅读(286) 评论(0) 推荐(0) 编辑

摘要: #define foreach(container,it) for(typeof((container).begin()) it = (container).begin();it!=(container).end();++it)demo:#include <iostream>#include <vector>#include <set>#include <map>#include <string>using namespace std; #define foreach(container,it) for(typeof((contain 阅读全文

posted @ 2013-02-18 20:53 扬名 阅读(1299) 评论(0) 推荐(0) 编辑

摘要: In software, astack overflowoccurs when too muchmemoryis used on thecall stack. The call stack contains a limited amount of memory, often determined at the start of the program. The size of the call stack depends on many factors, including the programming language, machine architecture, multi-thread 阅读全文

posted @ 2013-02-18 20:11 扬名 阅读(606) 评论(0) 推荐(0) 编辑