Hello, I need to search a char array, for a particular word... E.g.

char * search;
char arr[10] = {'b', 'c', 'a', 't', 'h', 'e', 'p', 'h'};
string words[1] = {"the"};

search = strstr (alphabet, words);

But it doesn't work... Any ideas what the problem could be?

Thanks :)

First don't make a string[]. Just use a string.
OR compare it to words[0];

commented: Great help, thank you :) +2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.