test.cpp

来自「用于在EVC下检测内存泄漏的工具」· C++ 代码 · 共 29 行

CPP
29
字号
// test.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

#ifndef _DEBUG
#define _DEBUG
#endif

#include "crtdbg.h"

#define new new(_T(__FILE__), __LINE__)

int WINAPI WinMain(	HINSTANCE hInstance,
					HINSTANCE hPrevInstance,
					LPTSTR    lpCmdLine,
					int       nCmdShow)
{
 	// TODO: Place code here.
	_CrtSetDbgFlag (ON);

	int* p = new int;

	*p = 10;

	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?