Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/04/2014, 14:43
DvNe
 
Fecha de Ingreso: octubre-2012
Mensajes: 37
Antigüedad: 11 años, 7 meses
Puntos: 0
Problema con unary_negate

Buenas estoy escribiendo la siguiente funcion
Código C++:
Ver original
  1. #include <iostream>
  2. #include <cstring>
  3. #include <functional>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. class EsDigito {
  9. public:
  10.   bool operator() (const char& c) const { return isdigit(c); }
  11. };
  12.  
  13. int main() {
  14.   unary_negate<bool> EsAlfabetico (EsDigito);
  15.   char letras2[] = " 452485A56321";
  16.   inicio = letras;
  17.   fin = letras + sizeof(letras)/sizeof(char);
  18.  
  19.   if (find_if(inicio,fin,EsAlfabetico()))
  20.     cout << "Alfabetico" << endl;
  21.   return 0;
  22. }

Cuando compilo me sale el siguiente error:

prueba.cpp:35:39: error: faltan argumentos para la función ‘std::unary_negate<bool> EsAlfabetico(EsDigito)’
prueba.cpp:30:22: nota: se declara aquí


Alguien me puede explicar el por qué

Última edición por DvNe; 07/04/2014 a las 14:49