I compile my program in linux - it has the following line :
std::sqrt((double)num);
On windows it is ok,but on linux I get 'sqrt' is not a member of 'std' I have an include for math.h
what is a problem with it?
Change the directive to #include <cmath>
. C++ headers of the form <cxxxxxxx>
are guaranteed to have the standard names in std
namespace (and may optionaly provide them in global namespace). <xxxxxx.h>
are not.