include <crtdbg.h>出错怎么解决
发布网友
发布时间:2022-11-29 04:45
我来回答
共1个回答
热心网友
时间:2023-10-26 11:21
//工具+选项+文本编辑器+(C++)+常规 ->行号
#define _CRTDBG_MAP_ALLOC
#include "stdlib.h"
#include "crtdbg.h"
#include <iostream>
using namespace std;
int* getInt() {
int* p = (int*)malloc(sizeof(int));
*p = 100;
return p;
}
char* GetMemory(char *p, int num)
{
p = (char*)malloc(sizeof(char) * num);
return p;