[Bug c++/19712] New: Can not use pow (as a function), must say std::pow explicitly.
larsnostdal at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jan 30 13:50:00 GMT 2005
#include <iostream>
#include <cmath>
using namespace std;
double func(double num, double pow)
{
return(pow(num, pow));
}
int main()
{
return(0);
}
error: `pow' cannot be used as a function
If I add std:: before pow, it works:
double func(double num, double pow)
{
return(std::pow(num, pow));
}
--
Summary: Can not use pow (as a function), must say std::pow
explicitly.
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: larsnostdal at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19712
More information about the Gcc-bugs
mailing list