Hi,

I am trying to learn functions but the book I'm using places the arguments into the function 'manually', they are 'constants'.

I'm trying to pass the arguments to the function by using variables.

Here is my code:-

Code:
#include <iostream>

using namespace std;

void box(int length, int width, int height);

int main()
{
    int length;
    int width;
    int height;

	cout << "Enter length of the box " << endl;
	cin >> length;
	cout << "Enter length of the box " << endl;
	cin >> width;
	cout << "Enter length of the box " << endl;
	cin >> height;
	box();
	
	system("pause");

	return 0;
}

void box(length, width, height)
{
	cout << "The volume of the box is " << length * width * height << endl;
}
This isn't compiling, using Dev-C++ it is saying:-

Line:5 "too few arguments to function `void box(int, int, int)'
Line 5 is-
void box(int length, int width, int height);
I'm confused as this line is straight from the book.

Could anyone be so kind as to offer me some pointers?

Many thanks!