Ambiguous symbol error?
Your variable max
conflicts with std::max()
. Try using a different name and it ought to fix that error.
I think the problem is not std::max()
but these horrible #define's
in minwindef.h
:
#ifndef NOMINMAX
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#endif /* NOMINMAX */
Use #define NOMINMAX
in your project settings or stdafx.h
.