Boost Users :
Subject: Re: [Boost-users] factorial function
From: John Maddock (john_at_[hidden])
Date: 2009-03-18 09:40:26
> I'm new to boost (and not so new but not very experienced to c++) and I'm
> having problems with functions defined with a template, as factorial
> My questions is, how do I call the funtion factorial? Why isn't it enough
> calling factorial(n) where n is an unsigned integer? Does one need to
> define the function specifying the result type before? If so, how?
> Thanks in advance.
You need to tell the function what you want the return type/precision to be:
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net