ALEXKK2011

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

2011年5月13日

摘要: 转自:http://www.tesoon.com/english/htm/02/5050.htmFreedom fighters can be found everywhere, and they are of all times.(Unit 14)自由战士在各个地区,各个时期都存在。该句的后半句,采用了be of接名词来说明句子的主语所具有的性质或特征。这是一种很常用的句式。be of 后可接两种不同性质和类型的名词,他们的意义大相径庭。 1. be of 后可接value, importance, use, help, significance, interest, benefit 等一些 阅读全文

posted @ 2011-05-13 13:57 alexkk2011 阅读(2039) 评论(0) 推荐(0) 编辑

2011年3月30日

摘要: 转自http://pppboy.blog.163.com/blog/static/30203796201082494026399/说明:结构体的sizeof值,并不是简单的将其中各元素所占字节相加,而是要考虑到存储空间的字节对齐问题。这些问题在平时编程的时候也确实不怎么用到,但在一些笔试面试题目中出是常常出现,对sizeof我们将在另一篇文章中总结,这篇文章我们只总结结构体的sizeof,报着不到黄河心不死的决心,终于完成了总结,也算是小有收获,拿出来于大家分享,如果有什么错误或者没有理解透的地方还望能得到提点,也不至于误导他人。 一、解释现代计算机中内存空间都是按照byte划分的,从理论上讲 阅读全文

posted @ 2011-03-30 16:34 alexkk2011 阅读(2073) 评论(0) 推荐(1) 编辑

2011年2月25日

摘要: #include <iostream>using namespace std;void main(){ int a[3] = {1,2,3}; int b[3] = {-1,-2,-3}; int const c[3] = {100,200, 300}; int x, y, z; const int ci = 100; //常量指针数组 int const *Arrayofcp[3] = {&b... 阅读全文

posted @ 2011-02-25 17:25 alexkk2011 阅读(295) 评论(0) 推荐(0) 编辑

2011年2月24日

摘要: #include <iostream>using namespace std;void swapf(char* a, char* b){ int n1 = *a, n2 = *b; n1=n1+n2; n2=n1-n2; n1=n1-n2; *a=n1, *b=n2;};void main(){ char x ='a', y='B'; char *px = &x, *py = &y; char &... 阅读全文

posted @ 2011-02-24 22:18 alexkk2011 阅读(164) 评论(0) 推荐(0) 编辑

摘要: #include <iostream>using namespace std;char* GetMem(void){ char p[] = "hello"; return p;};void main(){ char c[] = "a"; char* ptr = c; ptr = GetMem(); //strcpy(ptr,"hello!"); cout << ptr << endl; cout ... 阅读全文

posted @ 2011-02-24 18:45 alexkk2011 阅读(108) 评论(0) 推荐(0) 编辑