When I run
make -f makefile.osx RELEASE=true 64BIT=true
I got two errors, it seems the compiler doesn’t know which pow function should be called.
C++ has function overloading, isn’t it?
datafeed.cpp:439:79: error: call to ‘pow’ is ambiguous
assetVote.nMaxTradeExpParam = ExponentialParameter(maxTrade * pow(10, assetV…
^~~
/usr/include/c++/4.2.1/cmath:365:3: note: candidate function
pow(double __x, int __i)
^
/usr/include/c++/4.2.1/cmath:369:3: note: candidate function
pow(float __x, int __n)
^
/usr/include/c++/4.2.1/cmath:373:3: note: candidate function
pow(long double __x, int __n)
^
/usr/include/math.h:443:15: note: candidate function
extern double pow(double, double);
^
/usr/include/c++/4.2.1/cmath:357:3: note: candidate function
pow(float __x, float __y)
^
/usr/include/c++/4.2.1/cmath:361:3: note: candidate function
pow(long double __x, long double __y)
^
datafeed.cpp:440:79: error: call to ‘pow’ is ambiguous
assetVote.nMinTradeExpParam = ExponentialParameter(minTrade * pow(10, assetV…
^~~
/usr/include/c++/4.2.1/cmath:365:3: note: candidate function
pow(double __x, int __i)
^
/usr/include/c++/4.2.1/cmath:369:3: note: candidate function
pow(float __x, int __n)
^
/usr/include/c++/4.2.1/cmath:373:3: note: candidate function
pow(long double __x, int __n)
^
/usr/include/math.h:443:15: note: candidate function
extern double pow(double, double);
^
/usr/include/c++/4.2.1/cmath:357:3: note: candidate function
pow(float __x, float __y)
^
/usr/include/c++/4.2.1/cmath:361:3: note: candidate function
pow(long double __x, long double __y)
^
This issues arises from the source code from datafeed.cpp:439:79:
assetVote.nMaxTradeExpParam = ExponentialParameter(maxTrade * pow(10, assetVote.nUnitExponent));
assetVote.nMinTradeExpParam = ExponentialParameter(minTrade * pow(10, assetVote.nUnitExponent));
Compiler doesn’t know “10” is integer or float?