macros - How do I create a #define mapping to the spacebar character in C? -
i'm looking equivalent of this, without surrounding single quotes:
#define spacebar ' ' how do this? other character use either character or corresponding escape character. knowledge, however, there's no escape character spacebar. there sort of hex code can use? please help.
is there sort of hex code can use?
the ascii code space 32 or 0x20. if want use spacebar constant, can #define be:
#define spacebar 32 or
#define spacebar 0x20 caveat
the above encoding work systems use ascii , utf-8 encoding. systems use ebcdic encoding, decimal value encode space 64 (thanks due @basilestarynkevitch pointing out).
Comments
Post a Comment