P
Paul Erion
Hi,
I ran across the following #define in some documentation for an
embedded system (I truncated the actual define, but the general form is
intact).
#define PADDING \
"x-00: ab\r\n"\
"x-01: ab\r\n"\
"x-0F: ab"
and I'd like to convert it to a const. Unfortunately, my C/C++ is a
little rusty (well, maybe a lot rusty) and I'm not quite sure what an
equivalent "const" form might be for this thing. Would something like
the following work?
const char PADDING[] = {
'"','x','-','0','0',':',' ','a','b','\r','\n','"',
'"','x','-','0','1',':',' ','a','b','\r','\n','"',
'"','x','-','0','F',':',' ','a','b','"'
};
Any help would be greatly appreciated.
Thanks,
aul
I ran across the following #define in some documentation for an
embedded system (I truncated the actual define, but the general form is
intact).
#define PADDING \
"x-00: ab\r\n"\
"x-01: ab\r\n"\
"x-0F: ab"
and I'd like to convert it to a const. Unfortunately, my C/C++ is a
little rusty (well, maybe a lot rusty) and I'm not quite sure what an
equivalent "const" form might be for this thing. Would something like
the following work?
const char PADDING[] = {
'"','x','-','0','0',':',' ','a','b','\r','\n','"',
'"','x','-','0','1',':',' ','a','b','\r','\n','"',
'"','x','-','0','F',':',' ','a','b','"'
};
Any help would be greatly appreciated.
Thanks,
aul