I'm just starting to learn c++, and I'm having trouble understanding why this doesnt work. This prints out "1" instead of the actual calculation of "8." Why is this way incorrect?
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
usingnamespace std;
int volume (int l, int w, int h){
l*w*h;
}
int main(){
cout << volume(2,2,2) << endl;
}