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;
};
template<int N>
struct Factorial
{
static const int Result = N * Factorial<N - 1>::Result;
};
template<>
struct Factorial<0>
{
static const int Result = 1;
};
August 5th, 2010 - 22:35
jay哥哥威武~
August 5th, 2010 - 22:50
那必须的~