I am getting these messages when I compile my files with: gcc -Wall -ansi -pedantic -O *.c.Code:warning: implicit declaration of function `malloc' warning: implicit declaration of function `strlen' warning: implicit declaration of function `strcpy'
But if I compile with just gcc *.c the program compiles fine and works fine.
the lines that cause the message are:
Could you tell me what is wrong and what is the right way to do it? Thanks in advance.Code:p=(char*)malloc(strlen(buffer)+1); strcpy(p,buffer);



LinkBack URL
About LinkBacks


