Menu

'max' : is not a member of 'std'

Developers
nag123
2007-11-27
2013-05-13
  • nag123

    nag123 - 2007-11-27

    I am using STLPort and i get the following error. Previously i was using Standard STL.
    I am compiling under VC 6.0

    size_t e = (std::max)(a, b);

    Compiling...
    a.cpp
    c:\a.cpp(12) : error C2039: 'max' : is not a member of 'std'
    c:\a.cpp(12) : error C2065: 'max' : undeclared identifier

    I am not able to find an equivalent of std::max in stlport library.

    Any idea will be helpful...

    Thanks

     
    • Petr Ovtchenkov

      Petr Ovtchenkov - 2007-11-28

      > Any idea will be helpful...

      The general idea is to compile and run STLport's unit tests; some answers are here:  http://stlport.sourceforge.net/FAQ.shtml

       
    • Francois Dumont

      Francois Dumont - 2007-11-28

      Have you included required header <algorithm> ?

       

Log in to post a comment.