Posted on 2000-05-14
I am having problems when trying to use macros having the same name as that of functions. Actually <windows.h> includes <windef.h>. The min(a,b) and max(a,b) macros are defined in <windef.h>. On the other hand min() & max() functions are present in <valarray> an STL class . So whenever this two files are getting included at the same time it is giving an compilation error.
For example the following code will give compilation error
int main(int argc, char* argv)
Can any of you experts out there suggest a practical workaround / solution to this problem.