c++ - 'sqrt' is not a member of 'std' -


i compile program in linux - has following line :

std::sqrt((double)num); 

on windows ok,but on linux 'sqrt' not member of 'std' have include math.h

what problem it?

change directive #include <cmath>. c++ headers of form <cxxxxxxx> guaranteed have standard names in std namespace (and may optionaly provide them in global namespace). <xxxxxx.h> not.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -