报错提示:
Line 7: Char 26: error: invalid '+=' at end of declaration; did you mean '='?
int add_left += nums[a];
^~
代码:
int add_l(int& nums,int i)
{
for(int a=0;a<i;++a)
{
int add_left += nums[a]; 这是第七行代码
}
return add_left;
}