C
-
warning: incompatible implicit declaration of built-in function ‘strstr’Computer/linux 2008. 8. 15. 06:31
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
-
How to know the size of array [] in CComputer/linux 2008. 4. 23. 21:42
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.