could anyone help me??



Iam using visual studio 2010 and iam trying to use pow but it doesn't work it is keeping say >>> 1 IntelliSense: more than one instance of overloaded function "pow" matches the argument list: c:\users\toha\desktop\c++\enter_name\enter_name\enter_name.cpp
and >>> Error 1 error C2668: 'pow' : ambiguous call to overloaded function c:\users\toha\desktop\c++\enter_name\enter_name\enter_name.cpp


my program was as follows
#include <iostream>
#include<conio.h>
#include<cmath>
void main()
{
int z;
z= pow(2,2);
getch ();
}
Try another attempt:

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
#include <conio.h>
#include <cmath>

int main()
{
	int z;
	z= pow(2,2);
	std::cout << z;
	getch ();
}
condor

It gives me the same error
Last edited on
Or this approach:

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
#include <conio.h>
#include <cmath>

int main()
{
	double z;
	z= pow(2., 2);
	std::cout << z;
	getch ();
}

yay it works how can you explain??
thank you ..
The function pow() receives and gives double type variables. You see I changed the type of z. That's all.
Last edited on
Aha Thanks A lot ...
Topic archived. No new replies allowed.