#include
#include
int main()
{
char*string;
string = malloc(_MAX_PATH);//动态分配内存
if(string==NULL)
printf("Insufficient memory available\n");
else
{
printf("Memory space allocated for path name\n");
free(string);
printf("Memory freed\n");
}
}
改成(char*)malloc