When calling a function that has a return type, is it necessary to use the return type? Suppose the function modifies certain values and the return may or may not be necessary to use. Is it a good practice to do so? For example,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
template <typename T>
T funct(T value)
{
T temp;
... // some code
return temp;
}
int main ()
{
int number = 100;
funct<int> (number); // Do you have to use the return type the function returns? Should I avoid doing this?
}