我在嵌入式微处理器的闪存中有两个字符串,如下所示:
#define HELP_STRING \
"\r\nhelp:\r\n Lists all the registered commands\r\n\Software Version r\n"
#define VERSION " 0.3.2"
我想有这个:
static const CLI_Command_Definition_t xHelpCommand =
{
"help",
FULL_HELP_STRING,
prvHelpCommand,
0
};
其中FULL_HELP_STRING相当于:
#define FULL_HELP_STRING (HELP_STRING + VERSION)
如何实现这一目标?谢谢!
答案 0 :(得分:2)
只需删除+
,就像这样:
#define FULL_HELP_STRING HELP_STRING VERSION