i got this error ISO C++ forbids declaration of 'VolymCube' with no type .. i think i wrote exactly same as the book ( C++ for beginner in 3 weeks) but the program dont work here is the code.
Code:
#include <iostream>
int VolymCube ( int lenght, int width = 25, int height = 1);
using namespace std;
int main ()
{
int lenght = 100;
int width = 50;
int height = 25;
int volym;
volym = VolymCube( lenght,width,height);
cout << " Volym first round is " << volym << "\n";
volym = VolymCube( lenght,width);
cout << " Volym second round is " << volym << "\n";
volym = VolymCube( lenght);
cout << " Volym third round is " << volym << "\n";
int z;
cin >> z;
return 0;
}
VolymCube (int lenght, int width, int height)
{
return ( lenght * width * height);
}