Ah. still comes up with ...
"1>c:\users\katie\documents\visual studio 2010\projects\mathematic functions\mathematic functions\mathematic functions.cpp(43): warning C4715: 'factorial' : not all control paths return a value
1>c:\users\katie\documents\visual studio 2010\projects\mathematic functions\mathematic functions\mathematic functions.cpp(39): warning C4700: uninitialized local variable 'a' used"
when I changed to
1 2 3 4 5 6 7 8
longdouble factorial (longdouble m)
{
longdouble a;
if (a>1)
longdouble (a* factorial (a-1));
elsereturn 1;
}