【发布时间】:2018-05-23 20:39:57
【问题描述】:
int list::Sum_Even_Values(node *head)
{
static int sum=0;
if(!isempty())
{
if(head->info %2==0)
return head->info +Sum_Even_Values(head->next);
}
}
【问题讨论】:
-
如果
isempty()返回真会发生什么?或者head->info % 2 != 0?那你返回什么?
标签: c++ c++11 c++14 c++builder