[Insight-users] Borland 6 Build error
John Biddiscombe
John Biddiscombe" <jbiddiscombe@skippingmouse.co.uk
Sat, 23 Nov 2002 17:18:50 -0000
Luis, Interesting stuff, I'm sorry to say that this...
> #include <iostream>
>
> template<int N>
> class Factorial {
> public:
> enum { value = N * Factorial<N-1>::value };
> Factorial()
> {
> std::cout << "Factorial of " << N << " = " << value << endl;
> }
> };
>
> class Factorial<1> {
> public:
> enum { value = 1 };
> };
>
>
> main()
> {
> Factorial<5> f;
> return 0;
> }
Compiled fine. I say "Sorry" becasue if it didn't then we'd be closer to the
problem. NB. The enum was left in unchanged. It also compiled fine when I
put the static const unsigned in version in.
I'll play some more...
JB