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

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -