Problem :

When I try to compile c program, I met the following error message:
warning: incompatible implicit declaration of built-in function ‘strstr’

Analysis :

This means that no header file contains the strstr function that I use in the program.

Solution : 

Add the header file  according to my function (strstr)
#include <string.h>


posted by citadel
int sz, array[] = {1,2,3,4,5};

sz = sizeof(array)/sizeof(int);

for(i = 0;i < sz; i++ ) {..................}
const char *const canvas_type[6] =
  {
    "A", "B", "C", "D", "E", "F"
  };

  int sz = sizeof(canvas_type)/sizeof(char*);

With 64 bit AMD machine, the above mathod has a compiled problem.
posted by citadel