会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
dotdog
上一页
1
2
3
4
2015年3月30日
大端还是小端
摘要: //way 1union{ unsigned long biths; unsigned char bytes[4];} theValue;//way 2ndtypedef char* bytePointer;void showBytes(bytePointer p, int len){ in...
阅读全文
posted @ 2015-03-30 22:02 dotdog
阅读(249)
评论(0)
推荐(0)
2015年3月28日
c语言程序设计 字符串拷贝拷贝演变与初衷
摘要: /*v1*/void strcpy(char *s, char *t){ int i; i = 0; while((s[i] = t[i]) != '\0') i++;}/*v2*/void strcpy(char *s, char *t){ while((*s = *t) != ...
阅读全文
posted @ 2015-03-28 13:07 dotdog
阅读(201)
评论(0)
推荐(0)
2015年3月27日
内存 匹配串
摘要: /*返回t在s中的位置,若未找到则返回-1*/int strindex(char* s,char* t){ int i, j, k; for(i = 0; s[i] != '\0'; i++) for(k = i,j = 0; s[k]=t[j] && s[k]!='\0'; k++,...
阅读全文
posted @ 2015-03-27 22:21 dotdog
阅读(137)
评论(0)
推荐(0)
多态 C2
摘要: class apple {public: ~apple(){ std::cout << "~apple()" << std::endl;}};class banana : public apple { ~banana(){ std::cout << "~banana()" << std::e...
阅读全文
posted @ 2015-03-27 21:43 dotdog
阅读(109)
评论(0)
推荐(0)
多态 C1
摘要: 1 class base { 2 public: 3 virtual void test1() { std::cout << "base::test1"<< std::endl; } 4 void test2(){ std::cout << "base::test2"; } ...
阅读全文
posted @ 2015-03-27 21:26 dotdog
阅读(119)
评论(0)
推荐(0)
上一页
1
2
3
4
导航
博客园
首页
新随笔
联系
订阅
管理
公告