PHP Code:
string::size_type (*find_delimiter)(const basic_string&, string::size_type);
if(REVERSE_SEARCH)
find_delimiter=&string::find_last_of;
else
find_delimiter=&string::find_first_of;
Keeps giving me a parameter mismatch error.
Either this is because find_last_of has several different versions that take didfferent types or numbers of parameters, or it's because the function pointer I declare is incorrect.
The prototypes according to the VC++ help file is
PHP Code:
size_type find_last_of(E c, size_type pos = npos) const;
size_type find_last_of(const E *s, size_type pos = npos) const;
size_type find_last_of(const E *s, size_type pos, size_type n = npos) const;
size_type find_last_of(const basic_string& str, size_type pos = npos) const;
The last one is the one I want.
If I don't add string:: in front of size_type I get an error that size_type is undefined. So I changed it to string::size_type
Function Pointer Tutorial that I'm using