4255471e   
   From: miles@gnu.org   
      
   ptyxs writes:   
   > #include    
   > #include    
   >   
   > int main()   
   > {   
   > int a = 25;   
   > std::cout << std::sqrt(a) << std::endl;   
   > }   
   >   
   > doesn't compile (as expected), and outputs the following error   
   > message :   
   >   
   > [toto@localhost ~]$ g++ -std=c++0x -Wall -pedantic sqrtmy3.cpp   
   > sqrtmy3.cpp: In function ‘int main()’:   
   > sqrtmy3.cpp:8:18: error: ‘sqrt’ is not a member of ‘std’   
   > sqrtmy3.cpp:8:18: note: suggested alternative:   
   > /usr/include/bits/mathcalls.h:157:1: note: ‘sqrt’   
      
   You should say what version of g++ you have -- the above compiles   
   without error or warning with g++ versions 4.4 - 4.7, and with the   
   clang++ trunk version... (the most recent release version of clang++   
   doesn't support c++0x well enough).   
      
   -Miles   
      
   --   
   Future, n. That period of time in which our affairs prosper, our friends   
   are true and our happiness is assured.   
      
      
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|