Title: RE: C strstr function returns int or char *?

>>While compiling:

>>char *a = strstr("hello", "ccache=");
>>
>>Warning:
>>
>>pam_krb5_auth.c:287: warning: initialization makes pointer from integer without a cast
>>
>>So, why is an integer expected??????

On my machine here...

[EMAIL PROTECTED]:~$ cat test.c
#include <string.h>

int main()
{
        char *a = strstr("hello", "ccache=");
}

[EMAIL PROTECTED]:~$ gcc test.c
[EMAIL PROTECTED]:~$

Maybe something else in a different include file is defining strstr
before string.h gets to it?

Or else the problem is on a different line?

- Chris

Reply via email to