I've been going over and refactoring some code. I ended up changing a function from:
void setPerspective(float nearP = 0.1f, float farP = 1000.0f);
to
void setPerspective(float near = 0.1f, float far = 1000.0f);
and started getting a lot of strange 'missing ;' and 'missing )' errors.
It seems that near and far are #defined in windef.h. Fair enough; I'll avoid using them.
But then I noticed in another header file:
void setPerspective(float fov, float aspect, float near, float far);
Yet I get no trouble. Both of these header files have the same #includes...
Any idea why I'm getting issues in one, but not another? It doesn't seem to be the default parameters. Is it some arbitrary ordering of the #includes that might be causing issues with one header file and not another?