c++ Programming Glossary: my_is_digit
How to negate a predicate function using operator ! in C++? http://stackoverflow.com/questions/4583310/how-to-negate-a-predicate-function-using-operator-in-c My solution using boost is_digit worked well. struct my_is_digit bool operator char c const return c '0' c '9' int main string.. s.end boost is_digit s.end s.erase remove_if s.begin s.end my_is_digit s.end cout s endl return 0 Then I tried my own version the compiler.. own version the compiler complained error C2675 unary ' ' 'my_is_digit' does not define this operator or a conversion to a type acceptable..
|