Expand|Select|Wrap|Line Numbers
- #include <iostream>
- #include <power.h>
- #include <NTL/RR.h>
- #define NTL_NO_MIN_MAX
- using namespace std;
- NTL_CLIENT
- int main()
- {
- RR x, y, z;
- x = 5;
- y = 2;
- z = power(x, y);
- cout<<z<< "\n";
- cin.get();
- }
Expand|Select|Wrap|Line Numbers
- #include <iostream>
- #include <NTL/RR.h>
- #define NTL_NO_MIN_MAX
- using namespace std;
- NTL_CLIENT
- ZZ power(ZZ x,ZZ y)
- {
- ZZ a, b;
- b = x;
- for(a = 1; a < y; a++)
- {
- b = b*x;
- }
- return b;
- }
Expand|Select|Wrap|Line Numbers
- z = power(x, y);
16 C:\Dev-Cpp\Projects\main.cpp no matching function for call to `power(NTL::RR&, NTL::RR&)'
note C:\Dev-Cpp\Projects\power.h:10 candidates are: NTL::ZZ power(NTL::ZZ, NTL::ZZ)
note C:\Dev-Cpp\Projects\power.h:10 NTL::RR NTL::power(const NTL::RR&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::RR&, const NTL::RR&, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::quad_float NTL::power(const NTL::quad_float&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::quad_float&, const NTL::quad_float&, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::xdouble NTL::power(const NTL::xdouble&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::xdouble&, const NTL::xdouble&, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::xdouble NTL::power(const NTL::xdouble&, const NTL::ZZ&)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::xdouble&, const NTL::xdouble&, const NTL::ZZ&)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::ZZ&, long int, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::ZZ NTL::power(const NTL::ZZ&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::ZZ&, const NTL::ZZ&, long int)
C:\Dev-Cpp\Projects\Makefile.win [Build Error] [main.o] Error 1