抠腚爱揉曼 Coding Iron Man

5Aug/102

N!

template<int N>
struct Factorial
{
    static const int Result = N * Factorial<N - 1>::Result;
};

template<>
struct Factorial<0>
{
    static const int Result = 1;
};

Posted by Jay

Comments (2) Trackbacks (0)

Leave a comment

(required)

No trackbacks yet.