How can i add debug symbols so i can see whats going on better.
BTW i'm on devc++4 .
GDB debuger.
Thanks alot
Code:
//recursive factorial function
#include <iostream>
#include <iomanip>
using namespace std;
unsigned long factorial( unsigned long );
int main()
{
for (int i = 1; i <= 10; i++ )
cout << setw( 2 ) << i << "! = " << factorial( i ) << endl;
return 0;
}
// recursive definition of function factorial
unsigned long factorial( unsigned long number )
{
if ( number <= 1 ) // base case
return 1;
else // recursive case
return number * factorial( number -1 );
}