#include
#include "recursive.h"
#include "p2.h"
using namespace std;
static int sum_helper(list_t test, int result)
{
return (sum_helper(list_rest(test)),list_first(test)+result);
}
int sum(list_t test)
{
returnsum_helper(test,0);
}
/*
Get Errors
p2.cpp: In function `int sum_helper(void*, int)':
p2.cpp:9: error: too few arguments to function `int sum_helper(void*, int)'
p2.cpp:10: error: at this point in file
*/
2006-10-08
11:03:13
·
3 answers
·
asked by
topgun553
1
in
Computers & Internet
➔ Programming & Design