G
Gernot Frisch
Hi,
can I use the preprocessor, using sizeof(a)/sizeof(a[0]) to yield an
error for too long strings?
Like:
#define CRYPT(a) \
#if sizeof(a)/sizeof(a[0]) > 31 \
xCRYPT(a) \
#else\
#error xy\
#endif
(which of course doe not work)
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
can I use the preprocessor, using sizeof(a)/sizeof(a[0]) to yield an
error for too long strings?
Like:
#define CRYPT(a) \
#if sizeof(a)/sizeof(a[0]) > 31 \
xCRYPT(a) \
#else\
#error xy\
#endif
(which of course doe not work)
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com