C 언어의 몇 가지 경고

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’:

char * b = getstring()  더욱  char const *b = get_string(); 경고 가 없어 졌어 요.

좋은 웹페이지 즐겨찾기