ALEXKK2011

The Technical Side of alexKK2011
  博客园  :: 新随笔  :: 订阅 订阅  :: 管理

2011年2月23日

摘要: #include <iostream>using namespace std;void main(){ //int *iPtr = NULL; //iPtr = 5; //编译错误:error C2440: “=”: 无法从“int”转换为“int *” ////*iPtr = 5; // xxx.exe 中的 0x004113e8 处未处理的异常: ////0xC0000005: 写入位置 0x00000000 时发生访问冲突 //cout << iPtr << endl; //int *iPtr2; //*iPtr2 = 3; // Run-Time C 阅读全文

posted @ 2011-02-23 01:26 alexkk2011 阅读(221) 评论(0) 推荐(0) 编辑

摘要: #include <iostream>#include <string>using namespace std;void main(){ //exp.5 char c[10] = "abc"; char *charPtr = c; //charPtr & c are in stack cout << "char c[10] = \"abc\"\nchar* charPtr=c" << endl;... 阅读全文

posted @ 2011-02-23 01:02 alexkk2011 阅读(213) 评论(0) 推荐(0) 编辑

摘要: 转自:http://www.kuqin.com/language/20080420/7060.html %a 浮点数、十六进制数字和p-记数法(C99)%A 浮点数、十六进制数字和p-记法(C99)%c 一个字符 %d 有符号十进制整数 %e 浮点数、e-记数法%E 浮点数、E-记数法%f 浮点数、十进制记数法 %g 根据数值不同自动选择%f或%e.%G 根据数值不同自动选择%f或%e.%i 有符... 阅读全文

posted @ 2011-02-23 00:22 alexkk2011 阅读(149) 评论(0) 推荐(0) 编辑

摘要: 这个帖子收集了两个在网上比较流行的对堆和栈的理解,看了感觉比较清晰,随记之。 转自:http://hi.baidu.com/spacetimer/blog/item/8650a4ccba36831000e92819.html 在bbs上,堆与栈的区分问题,似乎是一个永恒的话题,由此可见,初学者对此往往是混淆不清的,所以我决定拿他第一个开刀。 首先,我们举一个例子: void f() { int* ... 阅读全文

posted @ 2011-02-23 00:05 alexkk2011 阅读(139) 评论(0) 推荐(0) 编辑