Re: [Dev-C++] Dev - C++ function syntax problem
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Lorenzo <co...@in...> - 2001-10-02 08:52:38
|
try to declare function out of the main.
ex.
#include <iostream>
using namespace std;
int area( int s1, int s2);
int main()
{
int vol;
vol = area(12, 13);
cout << "area(12, 13): " << vol << endl;
return 0;
}
int area( int s1, int s2 )
{
return s1*s2;
}
----------------------------------------------------------------------------
---
If debugging is the process of removing bugs,
then programming must be the process of putting them in.
----------------------------------------------------------------------------
---
|