76 315
Assignments Done
Successfully Done
In May 2019

Answer to Question #4936 in C++ for salma

Question #4936
whenever i compiled the following program this erroe apears ambiguous call to overload function
using namespace std;
int main()
int power;
int i=0;
int j=1;
while ((i<=10)&&(j<=11))
power=pow(int (i), int( j));
return 0;
Expert's answer
The problem is that there is not such prototype of pow function which takes two integers as parameters.
Instead of writing

power=pow(int (i), int( j));

you can try any from the following:

power=pow(double (i), j);
power=pow(long double (i), j);
power=pow(float (i), j);

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions