Book I'm working from had me input a polymorphic function code. Got it in word for word, but I'm getting compiler errors. I'm not sure what's causing the errors, b/c I copied it verbatim. Thinking it may be a compiler issue...?
1 2 3
In function 'long intDoulbe(long int)':
new declaration 'long int Doulbe(long int)'
ambiguates old declaration 'int Double(long it)'
So, that's the error. I get it for the functions float Double(float), long Double(long) and double Double(double). I know, horrible naming, but I'm copying out of the book...
int Double(int);
int Double(long);
int Double(float);
int Double(double);
int Double(int);
long Double(long);
float Double(float);
idouble nt Double(double);
The compiler I'm using is Dev C++ v4.9.9.2
Stop using it right now. Like, select directory with it and press shift+delete.
It is terribly outdated, contains numerous bugs and does not eve support C++11 standard. If you want to continue using it, switch to Orwell Dev-C++ 5.6.3.