#include <iostream>
template <int val, int base>
struct convert
{
static const int value = convert<val/10, base>::value * base + val % base;
};
template <int base>
struct convert<0, base>
{
static const int value = 0;
};
int main(int argc, char argv) {
std::cout << convert<34, 5>::value << std::endl;
return 0;
}
УНЯНЯ