大约有 9,000 项符合查询结果(耗时:0.0124秒) [XML]

https://www.tsingfun.com/it/cpp/gcc-asan.html 

gcc自带内存泄漏、内存越界检测工具 - asan - C/C++ - 清泛网 - 专注C/C++及内核技术

gcc自带内存泄漏、内存越界检测工具 - asangcc-asanasan内存异常检测工具,功能类似valgrind,不过是gcc自带的原生工具,使用起来非常简单,只需要链接时加上 -lasan 即可。(编译选项也可以加上 -fsanitize=address)测试代码如 asan内...
https://www.tsingfun.com/it/cp... 

编译错误 error: ISO C++ forbids declaration of ‘xxx’ with no type [-...

编译错误 error: ISO C++ forbids declaration of ‘xxx’ with no type [-fpermissive]error-iso-c-forbids-declaration-of-with-no-type比较可能的情况1:函数没有写返回类型,加上返回类型后编译成功。 ifndef ttTree_h define ttTree_hclass ttTree {public: ttTree(void); int ...
https://www.tsingfun.com/it/cp... 

编译错误 error: ‘typeof’ cannot be used as a function - C/C++ - 清泛网 - 专注C/C++及内核技术

编译错误 error: ‘typeof’ cannot be used as a functionerror-typeof-cannot-be-used-as-a-function编译一些开源的C项目,发现typeof关键字不能被识别,报错:error: ‘typeof’ cannot be used as a function。解决方法:修改C编译选项 -std=gnu99,使用GNU99 ...
https://www.tsingfun.com/it/cp... 

C++ protobuf使用入门实例 - C/C++ - 清泛网 - 专注C/C++及内核技术

C++ protobuf使用入门实例cpp_protobuf_demoprotobuf 是结构化数据的系列化 反序列化解决方案,类似XML JSON,但他的运行效率及压缩率均较后者高一个数量级,且完全的跨平台。使用步骤如下:1、定义一个 proto数据结构文件 protobuf 是结...
https://www.tsingfun.com/it/cp... 

‘std::tr1’ does not name a template type - C/C++ - 清泛网 - 专注C/C++及内核技术

‘std::tr1’ does not name a template typestd-tr1-does-not-name-a-template-type解决方法:添加头文件 if !defined(_MSC_VER) include <tr1 memory> endifC++ Technical Report 1 (TR1)是ISO IEC TR 19768, C++ Library Extensions(函式库扩充)的 解决方法:添加头文件 #if !def...
https://www.tsingfun.com/it/cp... 

namespace “std” has no member “clamp” - C/C++ - 清泛网 - 专注C/C++及内核技术

namespace “std” has no member “clamp”namespace-std-has-no-member-clamperror: &lsquo;clamp&rsquo; is not a member of &lsquo;std&rsquo;namespace std has no member clampC++17特性,加编译选项 -std=c++17error: &lsquo;clamp&rsquo; is not a member of &lsquo;std&rsquo; namespace “std” h...
https://www.tsingfun.com/it/cp... 

【解决】munmap_chunk(): invalid pointer - C/C++ - 清泛网 - 专注C/C++及内核技术

【解决】munmap_chunk(): invalid pointermunmap_chunk-invalid-pointer原因:new malloc出来的指针被覆盖掉了,然后delete free就会报这个错误。例如:char* word = (char*)malloc(10);word = "abc"; 应使用 strcpy(word, "abc");free(word) 原因:new/malloc出来的指针被...
https://www.tsingfun.com/it/cpp/cpu_avx_run.html 

CPU指令集avx程序无法运行,运行崩溃 - C/C++ - 清泛网 - 专注C/C++及内核技术

CPU指令集avx程序无法运行,运行崩溃cpu_avx_run原因就是CPU不支持相应的指令集导致的。Linux上使用 lscpu 命令查看CPU指令集,看是否支持。比如_mm256_cmpeq_epi64 这个函数需要avx2指令集,但是CPU不支持,就导致程序崩溃起不来。原因...
https://www.tsingfun.com/it/os_kernel/405.html 

Linux ftp上传文件 实战篇 - 操作系统(内核) - 清泛网 - 专注C/C++及内核技术

Linux ftp上传文件 实战篇$ftp passive ls put get等Linux命令完成ftp文件上传下载。连接FTP命令: $ftp xx.xx.xx.xx username password ftp> passive (需要关闭passive模式,不然上传不了) 查看远程FTP服务器文件命令: ftp> ls 若ls卡住...
https://www.tsingfun.com/it/te... 

php出现 Notice: Undefined index: xxx 的解决方法 - 更多技术 - 清泛网移...

php出现 Notice: Undefined index: xxx 的解决方法Php_Notice_Undefined_index出现 "Undefined index: xxx "警告的原因:PHP 本身不需要事先声明变量即可直接使用,但是对未声明变量会有提示,最好的办法是使用变量之前先检查变量是否存。出现"...