problem with finding

Hello all. I have a problem. I whant to find if the wchar_t before place pos, and only that character if there is in L" +-", but this solution give the all characters from pos-1 until end in finding.
Any suggestions?


1
2
3
4
5
6
7
8
bool isit(wchar_t &P, size_t pos)
{
        if (wcspbrk(L" +-",&((&P)[pos-1]))!=NULL)return true;
        return false;
}

wchar_t P[]=L"qw qw qwqwqwqw";
bool asd=isit(*P,1);
Last edited on
Topic archived. No new replies allowed.