How do I use strcasestr()?

前端 未结 2 1309
终归单人心
终归单人心 2021-02-12 23:04

I #include but when I call strcasestr(src, search); I get the following error message implicit declaration of function ‘strcases

2条回答
  •  天涯浪人
    2021-02-12 23:48

    You must add:

    #define _GNU_SOURCE
    

    before the string.h include, since the function is non-standard.

提交回复
热议问题