hello.c: In function ‘get_chars’:
hello.c:26:22: warning: incompatible implicit declaration of built-in function ‘malloc’ [enabled by default]
char *s = (char*)malloc(sizeof(char) * ( strlen(hello)+ 1));
^
添加 #include<stdlib.h>
hello.c:17:15: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
char *b = get_string();
^
hello.c: In function ‘get_chars’: