i was learning about Functions from a book.Keyed in the following code to my visual studio express and got two errors: expect a declaration and '{' : missing function header(old-style formal list.
what do they mean? Does this have to do with ans/isoi std?
#include <iostream>
using namespace std;
void showVolume (int length, int width=1 ,int height=1);
int main()
{
showVolume(4,6,2);
showVolume(4,6);
showVolume(4);
return (0);
}
void showVolume (int length, int width ,int height);
{ //complier expect a declaration here.
cout <<"Volume of a box with\n"
<< "Length=" << length << "Width =" << width
<< "and Height ="<< height
<< "is" << length*width*height;
}