vs2013提示malloc是未定义的标识符

问题如下:

vs2013提示malloc是未定义的标识符_第1张图片

解决:

加上#include "malloc.h"

#include
#include "malloc.h"
typedef char ElemType;
typedef struct BiNode{
	ElemType data;
	struct BiNode *lchild;
	struct BiNode *rchild;
}BiNode,*BiTree;
void preOrderCreateBiTree(){
	char ch;
	BiTree T;
	scanf("%c",&ch);
	if (ch=='#'){
		T = NULL;
	}
	else{
		T = (BiTree)malloc(sizeof(BiNode));
		
	}
}


你可能感兴趣的:(vs2013提示malloc是未定义的标识符)