От: | Анатолий Широков | ||
Дата: | 03.10.05 19:48 | ||
Оценка: |
#include <functional>
#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
inline bool is_num(std::string const &s)
{
return std::find_if(
s.begin(),
s.end(),
std::not1(std::ptr_fun(std::isdigit))
) == s.end();
}
int main()
{
std::cout << is_num("121212");
return 0;
}