searching problem

Hello all. I am looking for a function

1
2
3
4
size_t a_searchingFunction(wchar_t* word,wchar_t* seachingWord, size_t fromThisPlase){...

return ... the place that all seachingWord found(size_t)
}


Any function like this?
Thank's


Last edited on
use strstr() std c library function.

or you can use std::string::findfirstof()
I use strstr or better wcsstr, but how i can take the place of seachingWord, and how i must searching from size_t fromThisPlase?
Also findfirstof() function is not offering by codeblocks that i use.
Last edited on
Also findfirstof() function is not offering by codeblocks that i use.


So you are using a c compiler then? If you are writing c code then no you wouldn't have access to the standard libraries offered by a c++ compiler. I don't understand the other question at all.
No, i am using c++, and gcc compiler, but i think that c type search is more faster than using the searching in a wstring.
findfirstof() is in use by vc++ i think.
Find_First_Of is an algorithm that is part of the std c++ library and a member function of the std::string class. They are available with all c++ compilers that are compliant with the c++ std.
Thank's. I dont know get all STL. I conver to wstring fo sure. Good day and thank's.
Jim
Last edited on
you can use strstr also like find_first_of like this:

char *ptr = "Hello World!!!";

//lets say you want to search after o(position 4). so you can do this.

strstr((ptr+4),..rest of the arguments.. );

try this.
Topic archived. No new replies allowed.