0

Hi, I'm not sure what this code does.

```
int total(int value1, int value2)
{
int sum;
sum = value1 + value2;
return sum;
}
```

This method should take in 2 values and calculate the sum and return it. But I don't understand where it returns it to? In my main method I had:

```
string Uinput;
int num1;
int num2;
cout<<"Enter the 2 numbers you want to add"<<endl;
getline(cin,Uinput);
getline(cin,Uinput);
stringstream(Uinput)>>num1>>num2;
total(num1,num2);
//I want to print the sum but how do I get it from the total function????
```

I want to print the sum but how do I get it from the total function???? I don't understand