-
#define
Hi,
I want to define something and I need direction on it.
I want to define a comma (,) and the tab escape ('\t'), so I can use them later. Would it be:
Code:
#define TAB \t
#define COMMA ,
probably not, but I can't find it anywhere how to do it.
thanks
-
Try it. It should be OK depending on your context of how you use them. If you want to do something like this:
Then you need to do this:
If you want the tab as a string then:
Or leave off all quotes and use them in the code but that could get confusing... For example, originally, to assign the tab to a char, you'd have to do this:
Code:
#define TAB \t
...
char c = 'TAB'; /* This just looks wrong. */
-