Because apparently I don't have one. This code is from Teach Yourself C++ in 21 Days, listing 5.7, which is supposed to be written with the ASCII standard. I get the error message ISO C++ forbids declaration of ' from Dev C++ on line 25 (an opening brace for the function VolumeCube). The code is exactly as it appears in the book, save for "using namespace std". Thanks in advance.
Code:
#include <iostream>
using namespace std;
int VolumeCube(int length, int width = 25, int height = 1);
int main()
{
int length = 100;
int width = 50;
int height = 2;
int volume;
volume = VolumeCube(length, width, height);
cout << "First volume equals: " << volume << "\n";
volume = VolumeCube(length, width);
cout << "Second time volume equals: " << volume << "\n";
volume = VolumeCube(length);
cout << "Third time volume equals: " << volume << "\n";
return 0;
}
VolumeCube(int length, int width, int height)
{
return (length * width * height);
}