Mythma‘s C++ blog
用5年时间来学C++.
posts - 78,comments - 364,trackbacks - 0
C++ FAQ
瞧,这段神秘的程序      摘要: 瞧,这段神秘的程序  阅读全文
posted @ 2007-08-23 23:49 力为 阅读(1328) | 评论 (3)  编辑
用variant存point数据      摘要: 小小技巧,有更好的不?  阅读全文
posted @ 2006-08-30 15:30 力为 阅读(1121) | 评论 (1)  编辑
fstream 和 中文路径      摘要: 问题:
有时候用ifstream或ofstream打开带有中文路径的文件会失败。  阅读全文
posted @ 2006-06-09 22:01 力为 阅读(3662) | 评论 (14)  编辑
std::ostringstream::str()返回临时对象      摘要: 取得std::ostringstream里的内容可以通过str()和str(string&)成员函数。由于str()返回的是临时对象,因而会有如下误用……  阅读全文
posted @ 2006-06-08 16:49 力为 阅读(1166) | 评论 (5)  编辑
std::istream 和 '\r'      摘要: 最近遇到这样一种情况:使用getline处理有相同text内容的std::ifstream和std::istringstream时,得到的结果有差异。从std::istringstream中返回的一行会多出一个不可见的'\r'符号。  阅读全文
posted @ 2006-06-08 15:40 力为 阅读(738) | 评论 (2)  编辑
不同版本的VC引起的冲突一例      摘要: VC2005编译一个ATL工程的时候,出现这样一条错误:
midl : command line error MIDL1004 : cannot execute C preprocessor cl.exe

  阅读全文
posted @ 2006-05-23 17:46 力为 阅读(1045) | 评论 (4)  编辑
当VC的Release版与Debug版不一致时      摘要: 有些情况下,Debug版的程序运行的正常,可是用Release版就出问题了,网上有很多解决办法。最近,我不幸也遇到了这种情况,不过解决方法却很简单——更改编译选项。  阅读全文
posted @ 2005-12-28 11:08 力为 阅读(2897) | 评论 (9)  编辑
控制科学计数法的指数位数      摘要: 默认情况下,用科学计数法表示实数,输出的指数位数为3。如何控制使其只输出2位指数位?VC6下如何?VC2005又如何?  阅读全文
posted @ 2005-12-18 20:39 力为 阅读(1708) | 评论 (0)  编辑
如何通过FILE*操作内存文件?      摘要: 如何通过FILE*操作内存文件?----一个有难度的问题  阅读全文
posted @ 2005-10-14 17:30 力为 阅读(2110) | 评论 (10)  编辑