![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
文章平均质量分 92
zww_sap111
这个作者很懒,什么都没留下…
展开
-
strtoul 解析
http://blog.sina.com.cn/s/blog_5dfd44300100fzag.html用到strtoul总结一下unsigned long int strtoul(const char *nptr,char **endptr,intbase);nptr:待转化的字符串base:要采用的进制方式 :如base值为10则采用10进制,若base值为16则采用1转载 2013-03-12 00:01:17 · 600 阅读 · 0 评论 -
poedit使用(本地化和国际化)
gettext 的使用 开源官网 http://www.gnu.org/software/gettext/poedit的使用 http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/08/10/2133292.html http://www.cnblogs.com/xiaoch原创 2013-07-31 14:59:10 · 766 阅读 · 0 评论 -
C++ 闭包 探秘
http://microcai.org/2013/07/20/closure.htmlPosted on 20 Jul 2013我经常说协程, 说协程的时候又经常会提到闭包. 还有我常说, boost::bind 是神器 归根结底, 神的是 "闭包"没有闭包, 就无法实现 asio 协程 (注意, 我说的是 ASIO的协程, 并不是通常意义上 setjmp/longjmp 或者转载 2013-08-07 11:09:45 · 784 阅读 · 0 评论 -
general error c101008d: Failed to write the updated manifest to the resource of file...
mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file ".\Debug\merge.exe". f解决办法,那就是在项目属性——配置属性——链接器——清单文件中, 把生成清单改成否就行了。经过进一步的探索,发现在项目属性——配置属性——清单工具——输原创 2013-12-18 10:59:43 · 3390 阅读 · 1 评论 -
!!!从 std::list 中 size() 的时间复杂度引出的讨论
http://dantvt.is-programmer.com/posts/8313.html 很奇怪的,或者说是一个不应成为问题的问题...std::list 的 size() 方法时间复杂度是多少?第一感觉应该是 O(1) 没错吧,多一个变量用于储存链表长度应该是很轻易的事情。于是有了下面这段代码:#include#include#includeusing转载 2014-02-16 00:38:33 · 1287 阅读 · 0 评论 -
vc中ifstream ofstream不能读取带有中文路径
有时候用ifstream或ofstream打开带有中文路径的文件会失败。解决办法:1、使用C语言的函数设置为中文运行环境setlocale(LC_ALL,"Chinese-simplified");2、使用STL函数设置为系统语言环境std::locale::global(std::locale(""));当然选2啦! ofstream writefile; str原创 2014-03-01 14:32:33 · 1140 阅读 · 0 评论 -
并发内存分配TBB的解决方案
http://blog.163.com/cp7618@yeah/blog/static/70234777201211643415445/在多线程程序中,普通的内存分配将成为严重的性能瓶颈。我们可以通过使用Threading Building Blocks的可扩展内存分配器来避免内存分配竞争和假共享问题。 内存分配不仅是编程的基本任务,也是在多核编程时影响效率的一大挑战。在转载 2014-04-03 09:45:13 · 1700 阅读 · 0 评论 -
STL map 内存改变,迭代器失效,crash
http://blog.163.com/cp7618@yeah/blog/static/702347772012114103640735/问题描述游服文件TGameObjmap.h类TGameObjMap封装使用std::map, 在使用过程中会出现crash.原因分析 我们发现在使用TGameObjMap中,由于多线程没同步好或在使用迭代器同时内存改变,才导致的crash转载 2014-04-03 09:42:46 · 1387 阅读 · 0 评论 -
容器list使用之erase
程序里面使用了list容器,其中用到了erase()函数。花了点时间,搞清楚了erase()函数的机理。 常用的删除容器中元素的方法是如下(方法1): list List; list::iterator iter; for( iter = List.begin(); iter != List.end(); ) {转载 2014-04-03 09:44:05 · 499 阅读 · 0 评论 -
浅析 Linux 的国际化与本地化机制
http://www.oschina.net/question/12_7648Linux 是一个国际化的操作系统,它的工具集和设备驱动程序均支持多语言操作。本文通过分析 glibc 中实现国际化和本地化机制的函数和命令工具集以及从程序开发者、翻译者和用户等多角度浅析国际化和本地化机制,从而更好的理解和使用 locale。什么是国际化和本地化不同的国家和地区因文化的差异,在日期、时间转载 2013-07-30 16:34:50 · 471 阅读 · 0 评论 -
软件本地化(国际化)步骤
增加本地化代码实例#define LOCALE_DIR “/usr/share/locale”#define LOCALE_DIR “”//如果设置当前目录#define _(string) gettext(string)int main(){setlocale(LC_ALL, "");//配置地域化信息bindtextdomain("test",LOCALE_转载 2013-07-30 16:19:12 · 993 阅读 · 0 评论 -
WinDbg配置和使用基础
WinDbg是微软发布的一款相当优秀的源码级(source-level)调试工具,可以用于Kernel模式调试和用户模式调试,还可以调试Dump文件。1. WinDbg介绍: Debugging Tools and Symbols: Getting Startedhttp://www.microsoft.com/whdc/devtools/debugging/debugstart转载 2013-06-14 15:09:14 · 486 阅读 · 0 评论 -
volatile-内存屏障-互斥锁等-----非常好!
http://haohaoweixiao.blog.sohu.com/161972697.htmlhttp://baiy.cn/doc/cpp/advanced_topic_about_multicore_and_threading.htm#??????????_volatil volatile 关键字确实与原子操作有预定关联,但他们之间的关系并不像很多人想象的那么单纯:转载 2013-03-17 14:47:05 · 1319 阅读 · 0 评论 -
应用程序正常初始化(0xc015002)失败解决方法
http://blog.csdn.net/xiaosu123/article/details/5565942VS2005 sidebyside manifest error Microsoft.VC80.MFC Microsoft.VC80.CRT Microsoft.VC80.MFCLOC msvcr80.dll mfc80.dll eventlog VC2005 编译出来的程序文件,采转载 2013-04-18 17:27:47 · 1229 阅读 · 0 评论 -
结构体初始化
http://blog.csdn.net/hanchaoman/article/details/7225865对结构体struct a {int b;int c;}有几种初始化方式:struct a a1 = { .b = 1, .c = 2};或者struct a a1 = { b:1, c:2}或者struct a a1转载 2013-04-19 10:07:22 · 550 阅读 · 0 评论 -
按位异或运算符^
http://blog.csdn.net/kybd2006/article/details/3727218参与运算的两个值,如果两个相应位相同,则结果为0,否则为1。即:0^0=0, 1^0=1, 0^1=1, 1^1=0 例如:10100001^00010001=101100000^0=0,0^1=1 0异或任何数=任何数1^0=1,1^1=0 1异或任何数-任何数取反转载 2013-05-20 10:08:41 · 516 阅读 · 0 评论 -
c++中按位取反运算
http://blog.csdn.net/gukesdo/article/details/6998260html] view plaincopy#include stdio.h> #include iostream> using namespace std; void main() { //做这类题目抓住两点:第一、无论是以进制表示还是整数转载 2013-05-07 13:26:36 · 1016 阅读 · 0 评论 -
C++ 容器及选用总结
http://www.cnblogs.com/answeryi/archive/2011/12/16/2289811.htmlhttp://www.doc88.com/p-918959441663.html目录====================================================第一章 容器第二章 Vector和string第三章 关联转载 2013-05-07 17:54:21 · 413 阅读 · 0 评论 -
generated file: '../../build/vs71/release/lib_json\json_writer.asm': No such file or directory
I'm trying to use json-cpp in Visual Studio 2010. I have no problem when compiling debug, but release gives me the following error:C:\Dev\ThirdParty\jsoncpp-src-0.6.0-rc2\src\lib_json\json_writer.转载 2013-05-23 15:42:25 · 996 阅读 · 0 评论 -
lstrlenWInternal链接错误
http://blog.csdn.net/zhm_joy/article/details/7878224 有的时候可能出现如下错误(vc6.0工程转vs2005后):1>H264Addin.obj : error LNK2019: unresolved external symbol "int __stdcall lstrlenWInternal(wchar_t const *转载 2013-05-13 11:49:56 · 738 阅读 · 0 评论 -
stl中的vector,list,deque,map,set的区别
http://blog.163.com/cp7618@yeah/blog/static/702347772012101392727206/在STL中基本容器有: string、vector、list、deque、set、mapset 和map都是无序的保存元素,只能通过它提供的接口对里面的元素进行访问set:集合, 用来判断某一个元素是不是在一个组里面,使用的比较少map:转载 2014-04-03 09:44:32 · 528 阅读 · 0 评论