使用malloc()申请空间来存储任意长度的键入字符串
代码:
malloc_switch.c:
#include <iostream>
using namespace std;
#include <malloc.h>
#include <stdlib.h>
#include "malloc_switch.h"
#define DEBUG 1
// ==========================================================================================================
// 使用malloc()申请空间来存储任意长度的键入字符串
//
// 返回值:char * p_input 返回保存着输入字符串的空间的地址p_input
//
// ====================================================================&