在实际开发过程中,C++string类使用起来有很多不方便的地方,笔者根据根据这些不足简单的扩展了这个类,如增加与数字之间的相互转化和格式化字符串。不足的地方望指正。读者也可以根据自己需求继续扩展。头文件:exstring.h[cpp]view plaincopy/*Author:wuqiangEm... Read More
posted @ 2015-11-30 06:21
findumars
Views(1226)
Comments(0)
Diggs(0)
C++程序员编码过程中经常会使用string(wstring)类,你是否思考过它的内部实现细节。比如这个类的迭代器是如何实现的?对象占多少字节的内存空间?内部有没有虚函数?内存是如何分配的?构造和析构的成本有多大?笔者综合这两天阅读的源代码及个人理解简要介绍之,错误的地方望读者指出。首先看看stri... Read More
posted @ 2015-11-30 06:19
findumars
Views(3575)
Comments(0)
Diggs(0)
这几天写程序,无意间把编译中间文件给删了,然后就出现了C1083编译错误。xxx.cpp..\commen\xxx.cpp(2) : fatal error C1083: 无法打开预编译头文件:“Release\xxx.pch”: No such file or directory 在网... Read More
posted @ 2015-11-30 06:18
findumars
Views(1336)
Comments(0)
Diggs(0)
Reference: http://www.wintellect.com/blogs/jrobbins/pdb-files-what-every-developer-must-know Most developers realize that PDB files are something that Read More
posted @ 2015-11-30 06:17
findumars
Views(320)
Comments(0)
Diggs(0)
当 operator new 不能满足一个内存分配请求时,它抛出一个 exception(异常)。很久以前,他返回一个 null pointer(空指针),而一些比较老的编译器还在这样做。你依然能达到以前的目的(在一定程度上),但是我要到本文的最后再讨论它。 在 operator new 因回应一... Read More
posted @ 2015-11-30 06:15
findumars
Views(1471)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号