Hey I think it rahter than complicated.
Код:
#define char_val 1
#define double_val 2
#define VAL_(x) x##_val
#define VAL(x) VAL_(x)
#if VAL(ThisType) == VAL(char)
ThisType == char
#endif
#if VAL(ThisType) == VAL(double)
ThisType == double
#endif
How about my version
#if defined(CHAR_TYPE==2)
#define ui8 unsigned char
#elseif defined(CHAR_TYPE==1)
#define i8 char
#endif
Условная компиляция
-
- Новичок
- Posts: 49
- Joined: 05 May 2002 00:08