Basically, if you have code like this:
#include "windows.h" ... int minimum = std::min(a,b);it's going to blow up in your face.
Notice this at the bottom of that page: "This behavior is by design" . Seriously???
I solved the issue using extra parenthesis to prevent macro expansion thanks to stackoverflow:
int minimum = (std::min)(a,b);
And by the way... "windows.h" redefines lots of other stuff, beware! e.g. try to define the function DeleteFile and see what happens!
No hay comentarios:
Publicar un comentario