to assign a variable a specific ASCII-Char e.g. 7 (BEL) one can do this:
string b = CharToStr(7);
but I cannot use this function if I want to define B as Bell:
#define B 0x07
This will be just 7 :(
Is there a way to define B as Bell using #define?
Thanks in advance
Would the following work for you?
#define BELL CharToStr(7)
I didn't try that because I was convinced the compiler will complain...
#define BELL '\x7' // Char not string
To add comments, please log in or register