Ah, good catch!*snip*

I was hoping for a more concise solution, but here we go (so now you can use commas and hyphens in your numbers!):I think we should pool our efforts and make a programming language where this kind of thing is sane.

#include <type_traits> template <typename T> struct Number { mutable T n; Number(T n) : n(n) {} const Number<T> operator+() const { return *this; } template <typename U> const Number<typename std::common_type<T, U>::type> operator, (const Number<U>& num) const { return n + num.n; } template <typename U> const Number<typename std::common_type<T, U>::type> operator- (const Number<U>& num) const { return n + num.n; } template <typename U> const Number<typename std::common_type<T, U>::type> operator+ (const Number<U>& num) const { return n + num.n; } template <typename U> const Number<typename std::common_type<T, U>::type> operator* (const Number<U>& num) const { return n * num.n; } operator T() const { return n; } }; Number<unsigned long long> operator"" _n(unsigned long long n) { return n; } #define ONE +1_n #define TWO +2_n #define THREE +3_n #define FOUR +4_n // ... add more if you wish #define TWENTY +20_n #define HUNDRED *100_n #define THOUSAND *1000_n #define AND #define TIMES * #define MINUS - #include <iostream> int main() { // The only real drawback is that you have to surround them with parentheses if you use , int x = (FOUR THOUSAND, ONE HUNDRED AND TWENTY-THREE); int y = (ONE HUNDRED AND ONE); int result = x TIMES y; std::cout << x << " * " << y << " = " << result << std::endl; result = x MINUS y; std::cout << x << " - " << y << " = " << result << std::endl; }

**Edited by Cornstalks, 19 March 2013 - 12:21 AM.**