
C++
文章平均质量分 71
C++学习笔记
Kearney form An idea
个人博客:https://anidea.gitee.io 备用地址:https://backmountaindevil.github.io
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
段错误 (核心已转储) + free(): double free detected in tcache 2 已放弃 (核心已转储)
status$ ./server段错误 (核心已转储)# another terminal$ ./client File transfer success!free(): double free detected in tcache 2已放弃 (核心已转储)文件正常接受sulotion万事先搜索free(): double free detected in tcache 2 如何解决 从此为bug秃头 2021-04-19free():在tcache 2中检测到双空闲,在执行程原创 2021-07-05 13:40:26 · 9998 阅读 · 3 评论 -
C++ 计时函数 - 统计程序运行了多长时间
简介实验需求:统计程序或者某个函数的运行时间框架#include <stdio.h>#include <time.h> //计时必备int main(){ clock_t start, stop; double duration; //记录函数运行时间, 单位为秒. start=clock(); MyFunction();//要进行计时的函数或者程序 stop=clock(); duration=((double)(stop-st原创 2020-10-28 16:29:28 · 731 阅读 · 0 评论 -
Win10上成功离线安装mingw-w64 && 配置 VScode C/C++
mingw-w64下载下载地址传送SourceForge-mingw-w64如果你和我一样win10 64位,选x86_64-win32-seh就没错了,不会科学上网的我。。这下载速度还比不上百度网盘。。狗头保命,有网友给出了百度网盘的资源,参考这位靓仔的博客 - 百度网盘哥为什么不要选择online installer,因为下载慢还会自觉断开。。。长城防火墙背锅32位win的盆友就选i686,linux的盆友选择posix环境变量mingw-w64的路径里最好不要带空格、中文,不然后面你原创 2020-10-14 10:37:52 · 1313 阅读 · 0 评论 -
C++读取二进制文件中的十六进制数据
二进制文件data.txt0x800000000x800000040x800000080x8000000C0x000000200x800000100x800000140x800000180x8000000C0x00000024C++输入流控制符#include <iostream>#include <fstream>void main(){ unsigned int data; ifstream infile; infile.open原创 2020-06-02 21:02:16 · 1474 阅读 · 0 评论 -
Visual Studio Error C4996
编译器警告(等级3) C4996重要此警告始终是来自声明符号的标头文件的作者的故意消息。 不要在不了解后果的情况下使用已弃用的符号。备注Visual Studio 库中的许多函数、成员函数、模板函数和全局变量已弃用。 有些,例如 POSIX 和 Microsoft 特定的函数,因为它们现在具有不同的首选名称。 某些 C 运行时库函数被弃用,因为它们不安全,并且具有更安全的变体。 其他内容已...转载 2020-04-04 17:37:18 · 370 阅读 · 0 评论