开发者

Function Parameter is "#define"?

Something weird I've never come across before. I wrote this function for on开发者_如何学JAVAe of my school projects:

void j_glOrtho(int left, int right, int bottom, int top, float near, float far)

For some reason Microsoft Visual C++ says that near and far are #define instead of float. As a result, I get a compiler error when I try to use them as floats. Anyone know what's going on?


I believe it's some legacy compatibility for DOS and 16-bit things. I'm not sure if this will work, but try it:

#ifdef near
#undef near
#endif
#ifdef far
#undef far
#endif
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜