I am using the library <functional>
which defines the class function
. But when I try to compile the code I get an error that function
does not name a type.
Till recently I was using Microsoft Visual Studio and there was no problem. Now I sometimes work on Ubuntu 14.04 with Eclipse and g++ and got this error when compiling the same code (except the 'main').
I found here some similar problems but none of the solution works for me.
#include <functional>
using namespace std;
typedef function<double(double, double*)> t_function;
error on third line, I also tried different (and no namespaces) with different using and none works