Is this function wrong? please ^^

please, i have looked everywhere.
is this function ok?

1
2
3
4
5
6
7
8
9
10
#include <string.h>

int contains(char const * * verse ){
  
  if(strstr(verse,"Baobab")){
    return 1;
  }
  
  return 0;
}


thanks ^^
Are you getting any errors? Is it not working as expected?

I think you may want verse to be simply a const char*, not a double pointer.
thanks for answer ^^

that variable is defined with double pointer.

char const * * text;

i just want to know if a word exist in text, so i added this function,
but the program crashes without error after a period of time running.


if you say that function is ok. ill look the error elsewhere.

thanks for help ^^
Topic archived. No new replies allowed.