B
Billy Mays
Hey clc,
I am trying to use the UINT_MAX macro defined in limits.h but it doesn't
seem to be defined which I try to compile my code. I looked through my
limits.h file and found this line:
/* If we are not using GNU CC we have to define all the symbols ourself.
Otherwise use gcc's definitions (see below). */
#if !defined __GNUC__ || __GNUC__ < 2
It seems that it is expecting the compiler (gcc for me) to make the
appropriate defines, but I still get this error:
file.c: In function ‘main’:
file.c:12: error: ‘INT_MAX’ undeclared (first use in this function)
I would really prefer to not override this Macro, since I don't know all
the implications of doing so. Is there a right way to get these limits
defined?
Bill
I am trying to use the UINT_MAX macro defined in limits.h but it doesn't
seem to be defined which I try to compile my code. I looked through my
limits.h file and found this line:
/* If we are not using GNU CC we have to define all the symbols ourself.
Otherwise use gcc's definitions (see below). */
#if !defined __GNUC__ || __GNUC__ < 2
It seems that it is expecting the compiler (gcc for me) to make the
appropriate defines, but I still get this error:
file.c: In function ‘main’:
file.c:12: error: ‘INT_MAX’ undeclared (first use in this function)
I would really prefer to not override this Macro, since I don't know all
the implications of doing so. Is there a right way to get these limits
defined?
Bill