大约有 11,000 项符合查询结果(耗时:0.0131秒) [XML]
fopen 引起的 malloc(): memory corruption的原因分析 - C/C++ - 清泛网 - 专注C/C++及内核技术
fopen 引起的 malloc(): memory corruption的原因分析fopen_malloc_crash其实不一定是fopen引起的,但引起这个异常的真正元凶通常会在fopen附近,而且直到执行fopen时,调用了内部的malloc,才会抛出这个异常, 这个异常通常是由于数组空间的...
Linux C++程序内存占用过高的原因分析 - C/C++ - 清泛网 - 专注C/C++及内核技术
Linux C++程序内存占用过高的原因分析linux_memory_usage_too_high1、使用top命令查看内存占用情况,物理内存占用过高时,也重点看一下Swap交换内存占用情况,如果交换内存也开始被使用了,那一定是程序的内存泄漏导致的,Linux使用va...
Linux C/C++进程单实例互斥代码分享 - C/C++ - 清泛网 - 专注C/C++及内核技术
Linux C/C++进程单实例互斥代码分享linux-process-singleton分享一段LinuxC C++程序只能启动一份实例的实现代码,原理是通过文件锁互斥实现,最重要的是考虑了不同用户运行同一程序互斥的场景,已经过充分的测试,可直接用于实际项...
VS编译dll时报编译错误:fatal error LNK1561: entry point must be define...
VS编译dll时报编译错误:fatal error LNK1561: entry point must be definedentry-point-must-be-definedVS编译dll时报编译错误:fatal error LNK1561: entry point must be defined1、可能是连接命令中的 subsystem不正确,在Project Properties->Linker->System中设置,改为 V...
Eclipse CDT利用gdbserver远程调试 - C/C++ - 清泛网 - 专注C/C++及内核技术
Eclipse CDT利用gdbserver远程调试eclipse-cdt-gdbserver场景:调试机器A,目标机器B1、目标机器上启动gdbserver:ps -elf | grep (process)gdbserver --attach :10000 (pid)2、调试机器上启动Eclipse Attach模式:场景:调试机器A,目标机器B
1、目标机器上启...
c++11 std::call_once只调用一次函数,类似单例模式 - C/C++ - 清泛网 - 专...
c++11 std::call_once只调用一次函数,类似单例模式std_call_oncestd::call_once 保证函数或者一些代码段在并发或者多线程的情况下,始终只会被执行一次,Demo如下: include <iostream> include <thread>static std::once_flag g_once_flag std::call_once 保证...
cout保留两位小数输出 - C/C++ - 清泛网 - 专注C/C++及内核技术
cout保留两位小数输出cout_two_decimalC++ std::cout输出2位小数的代码: include <stdio h> include <iostream> include <iomanip> std::setprecision函数需要引入该头文件int main(){ double dval C++ std::cout输出2位小数的代码:
#include <stdio.h>
#include <iostr...
gcc编译警告:misleading-indentation - C/C++ - 清泛网 - 专注C/C++及内核技术
gcc编译警告:misleading-indentationgcc-misleading-indentationmisleading-indentation(不正确的缩进),一般都是Tab及空格的缩进问题导致。实例1:Tab、空格混用将:[空格] if(err)[空格] fprintf(stderr, "op faile misleading-indentation(不正确的缩...
Undefined reference to symbol X509_free - C/C++ - 清泛网 - 专注C/C++及内核技术
Undefined reference to symbol X509_freeundefined-reference-to-symbol-x509-freeUndefined reference to symbol X509_free 编译错误的解决方法:链接库中增加 -lcrypto,而非 -lcrypt参考:https: stackoverflow com questions 33215936 undefined-reference-to-symbol-x509-freeUndefined refer...
【解决】eclipse新建项目报错:overlaps the location of another project:...
【解决】eclipse新建项目报错:overlaps the location of another project: 'xxx'eclipse-error-overlaps-the-location-of-another-projectEclipse新建项目时报错:overlaps the location of another project: & 39;xxx& 39;,确保workspace下没有重复的工程,但之前曾经添加并删...
