heres another thing that will not work...
its of a book im readin and it wont work. the error is below it.
sorry to keep asking.
Code:
// demonstrates the use of default parameters
#include <iostream>
using namespace std;
int AreaCube(int Length, int Width = 25, int Height = 1);
int main()
{
int Length = 100;
int Width = 50;
int Height = 2;
int Area;
Area = AreaCube(Length, Width, Height);
cout << "First area equals: " << Area << "\n";
Area = AreaCube(Length, Width);
cout << "Second area equals: " << Area << "\n";
Area = AreaCube(Length);
cout << "Third area equals: " << Area << "\n";
system("PAUSE");
return 0;
}
AreaCube(int Length, int Width, int Height)
{
return (Length * Width * Height);
}
Code:
------ Build started: Project: area thing, Configuration: Debug Win32 ------
Compiling...
area thing.cpp
.\area thing.cpp(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Build log was saved at "file://c:\Documents and Settings\Reece.YOUR-E0367A1424\My Documents\Visual Studio 2005\Projects\area thing\area thing\Debug\BuildLog.htm"
area thing - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
hugo.