i am using basename() function in my code.
Where i am including
#include <unistd.h>
and when i m compiling that code with -Wall flag it shows
following warning
warning: implicit declaration of function ‘basename’
if i am writing its declaration in my code
char * basename (const char *fname);
then it does not show that warning
why this happening.?
You need to include
<libgen.h>.The standard says it’s in
libgen.h, kernel.org does so too.