theEagles

I am sailing, to be with you, to be free.
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年4月23日

摘要: //===============================================// string ------> number//===============================================//int atoi ( const char * str );//__int64 atoi ( const char * str );//long i... 阅读全文

posted @ 2012-04-23 10:09 theEagles 阅读(423) 评论(0) 推荐(0)

2012年3月14日

摘要: CArchive:: << CString 会先写入字符串的长度,再写入字符串。 如果是Unicode字符串,写每个CString 之前都会先写入编码"FF FE”,再写入字符串长度值,最后写入字符串。 写入的字符串长度值是经过编码后的值,添加了一些冗余,目的是为了自解释性。 因此,如果用<<把CSting写入了文件,读取时也必须用>>才能正确地把它读出来。 CArchive::WriteStr... 阅读全文

posted @ 2012-03-14 19:54 theEagles 阅读(1214) 评论(0) 推荐(0)

2012年2月29日

摘要: 1) What to do: 加载资源图标到CImageList: 2) How to do: CBitmap bmp;bmp.LoadBitmap(IDB_GRAPH16x16);UINT nFlags = ILC_MASK;nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4;m_ImageList.DeleteImag... 阅读全文

posted @ 2012-02-29 12:42 theEagles 阅读(1246) 评论(0) 推荐(0)

2012年2月21日

摘要: Mutable 关键词的作用是:可以在常函数中被修改其值。Mutable适用的场合极少,因此当你觉得你需要使用该关键词时,请再三思考!下面列出几种Mutable适用的场合:1. You have a constant object, but for debugging purposes want to track how often a constant method is called on it. Logically you're not changing the object. Note that if you're making decisions in your pr 阅读全文

posted @ 2012-02-21 01:17 theEagles 阅读(1049) 评论(0) 推荐(1)

2012年2月20日

摘要: 普遍的情况~ 阅读全文

posted @ 2012-02-20 23:43 theEagles 阅读(230) 评论(0) 推荐(0)

摘要: 如题... 阅读全文

posted @ 2012-02-20 23:40 theEagles 阅读(155) 评论(0) 推荐(0)

摘要: 如题... 阅读全文

posted @ 2012-02-20 23:40 theEagles 阅读(131) 评论(0) 推荐(0)

2012年2月11日

摘要: //模板类Comparetemplate<class T1, class T2>struct Compare{ bool eq(T1 a, T2 b) { return ParamTraits<T1,T2>::Equal(a,b); }};//全特化template<>struct Compare<int, int>{ bool eq(int a, int b);};//偏特化template<class T>struct Compare<int, T>{ bool eq(int,T);};//模板特化template&l 阅读全文

posted @ 2012-02-11 19:41 theEagles 阅读(225) 评论(0) 推荐(0)