I got the following code in C++ :
in main():
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
cout << function(1) << endl;
return 0;
}
in my source code file:
#include <math.h>
int function(int number)
{
int value(number + 2);
return value;
}
And in my header called "math.h" :
#ifndef MATH_H_INCLUDED
#define MATH_H_INCLUDED
int function(int number);
#endif // MATH_H_INCLUDED
When I try to compile it I got the error : "function" was not declared in this scope
Where am I wrong?