Because converting Foo** → const Foo** would be invalid and dangerous. C++ allows the (safe) conversion Foo* → Foo const*, but gives an error if you try to implicitly convert Foo** → const Foo**. The rationale for why that error is a good thing is gi…
交叉编译.c文件,遇到如下问题 arm-linux-gcc -o show_lines show_lines.c -lfreetype -lm show_lines.c:199:19: error: converting to execution character set: Invalid or incomplete multibyte or wide character 大概意思是,转换为执行字符集:无效的或不完整的宽字节 解决方案:编译时,再加入 -finput-charset=GBK…
今天看书,Thinking in c++ volume 2 "Adaptable function objects" 里面作者说: Suppose, for example, that we want to make the function object gt_n, definedearlier in this chapter, adaptable. All we need to do is the following: class gt_n : public unary_funct…