
c++
FFFF...ireCore
这个作者很懒,什么都没留下…
展开
-
C++内存泄露检测
#include <stdio.h>#include <iostream>static unsigned int totalCount = 0;struct TestStruct{ public: TestStruct() { } ~TestStruct() { }};void* operator new(size_t size){ printf("(Enter new)\n"); ++totalCount; char* allo.原创 2021-10-08 12:15:38 · 99 阅读 · 0 评论 -
Lambda表达式中 值捕获的问题
使用值捕获不可以在表达式内修改值,但是使用Mutable关键字可以打破这一规则 但是即使在lambda表达式内修改了值, 在作用域外, 值也不会呗改变下面这段例子输出的是InsideOutside#include <memory>#include <iostream>#include <stdio.h>#include <functional>struct Mystruct{Mystruct(){std::原创 2021-10-08 12:11:09 · 344 阅读 · 0 评论 -
C++ 打印方法名
https://www.youtube.com/watch?v=FBbPWSOQ0-w原创 2019-06-23 14:14:50 · 390 阅读 · 0 评论 -
Windows下在程序崩溃前尝试捕获异常信息并输出
[转]window下使用SetUnhandledExceptionFilter捕获让程序的崩溃简单使用SetUnhandledExceptionFilter()函数让程序优雅崩溃安卓平台的看这里https://blog.youkuaiyun.com/i_lovefish/article/details/17719081虽然是大公司的产品,QQ它还是会在我们的折腾下崩溃的,但是它总是崩溃的很优雅,...转载 2019-06-19 10:17:13 · 4202 阅读 · 0 评论 -
通过DXGI实现高效抓屏
DXGI快速截屏录屏技术概述 很多地方都需要用到截屏/录屏技术,比如桌面直播,桌面录制等等。在微软Windows平台,有很多截屏的接口,不过大多数性能并不理想,Windows8以后微软引入了一套新的接口,叫“Desktop Duplication API”,应用程序,可以通过这套API访问桌面数据。而由于Desktop Duplication API是通过Microsoft DirectX ...转载 2019-05-09 22:51:13 · 6829 阅读 · 0 评论 -
利用OpenCV+WinAPI 实现快速屏幕截图
#include "stdafx.h"#include "cv.h"#include "highgui.h" using namespace cv; void Screen();BOOL HBitmapToMat(HBITMAP& _hBmp,Mat& _mat);HBITMAP hBmp;HBITMAP hOld; void main()...转载 2019-05-09 22:32:24 · 2762 阅读 · 0 评论 -
CUDA 学习 简介--个人翻译
CUDA − Compute Unified Device Architecture. It is an extension of C programming, an API model for parallel computing created by Nvidia. Programs written using CUDA harness the power of GPU. Thus, incr...原创 2019-05-13 21:04:21 · 399 阅读 · 0 评论 -
Boost::Asio 官方教程地址
https://www.boost.org/doc/libs/1_69_0/doc/html/boost_asio/tutorial/tutdaytime1.html原创 2019-03-30 13:11:29 · 1074 阅读 · 0 评论 -
srand() 作用域
srand(seed) 作用域为全局原创 2019-03-06 19:23:42 · 830 阅读 · 0 评论 -
空悬指针和野指针
之前一直以为所有指向为初始化和已销毁内存块的指针都叫野指针。原来指向已销毁内存块的指针有一个专有名词叫空悬指针,而野指针专指没有初始化的指针。空悬指针示例:int* foo(){ int a = 1; return &a;}野指针int* a; ...原创 2019-02-14 13:55:54 · 163 阅读 · 0 评论 -
ByteBuffer
main.cpp//// main.cpp// WorldPacket//// Created by ljw on 2019/2/16.// Copyright © 2019 602809934@qq.com. All rights reserved.//#include <iostream>#include "WorldSession.hpp"#i...原创 2019-02-16 13:41:44 · 168 阅读 · 0 评论 -
ByteBuffer暂存
PlayerSession::PlayerSession() : m_Buffer((uint8*)malloc(1)), m_BufferLength(0){}PlayerSession::~PlayerSession(){ free(m_Buffer); m_Buffer = nullptr;}void PlayerSession::onRecvBuffer(ch...原创 2019-02-16 10:23:28 · 128 阅读 · 0 评论 -
使用depends浏览exe文件所使用的动态链接库,以便打包给未安装VS的客户使用
两种方法,用depends打开可执行文件(exe、dll、ax、ocx等)1、右击可执行文件,选打开方式,然后浏览到depends2、打开depends,然后在菜单文件--打开文件--浏览到可执行文件...原创 2019-02-21 18:37:13 · 541 阅读 · 0 评论