rainbowzc

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: :: :: 管理 ::

2006年9月18日

摘要: IntroductionIt's my first article. At first I must express my thank to codeproject and all of selflessness people. I have tried to look for a sample show me how to skin a window's internal scrollbar, but,unfortunately, I failed. Some days ago, I got inspiration: In order to skin a window' 阅读全文
posted @ 2006-09-18 11:49 ct 阅读(389) 评论(0) 推荐(0) 编辑

摘要: 1. string.empty() 不是用来清空字符串,而是判断string是否为空,清空使用string.clear();2. string.find等查找的结果要和string::npos比较,而不是和-1比较。(各个平台可能不同)3. 将string转为char * ,用char * t = (char *)s.c_str() ,而不是 char *t =s.begin() 或者 char *t = &s[0] 或者 char *t =s.data(); 4. 不要用错string.find ,string::find_first_of ,find和find_first_of有本 阅读全文
posted @ 2006-09-18 10:53 ct 阅读(209) 评论(0) 推荐(0) 编辑

摘要: 作为C++编译器,从vc6到vc8最大的调整就是对C++标准的支持更好了。我发现的几点不同。a. For 循环的声明Vc6: for(int i<0;i<100;++i){}; j = i; (ok)Vc8: for(int i<0;i<100;++i){}; j = i; (illegal) int i; for(i<0;i<100;++i){}; j = i; (ok)Vc8中的for循环中变量的有效期仅仅在for 循环的开始与结束期间有效。b.string实现Vc6: string s; char *p = s.begin(); (ok)Vc8: st 阅读全文
posted @ 2006-09-18 10:49 ct 阅读(189) 评论(0) 推荐(0) 编辑