Finding the errors in the function

I need to find the errors in this function:

void total(int value1, value2, value3)
{
return value1 + value2 + value3;
}

I know that a void function cannot return anything. Therefore, I don't know where to start. Would it be something like this...?

1
2
3
4
5
void total(int value1, value2, value3)
{
sum= value1 + value2 + value3
cout << "The sum of your values is: " << sum << endl;
}
void total(int value1, int value2, int value3)
Topic archived. No new replies allowed.