On Jan 23, 3:18 pm, "Daniel T." <danie...@earthlink.netwrote:
"Angus" <nos...@gmail.comwrote:
I am following the exercises in Accelerated C++ Practical Programming by
Example and when use:
using std::max; I get these compile errors in MS Visual C++ v6
error C2039: 'max' : is not a member of 'std'
error C2873: 'max' : symbol cannot be used in a using-declaration
I have #include'd <algorithm- but cannot see the function declared in
there.
Is max a fairly new standard library feature? How do I get this to work?It is not "fairly new" is was there when the standard was ratified
AFAIK. Try using a different compiler.
It's true, as others have pointed out, the VC6 was not especially
standards compliant.
(It was after all released before the C++ standard was finalized.)
However, in this particular case, you might want to check if the
problem is a conflict
with another header file. For example, speaking purely hypothetically
(hypotheticals
are always on topic right?), windows.h defines a macro named max. You
can turn this
off by defining the symbol NOMINMAX before you include windows.h.