宏不在字符串中替换或者在评论中。你可以用这样的sprintf实现你想要的东西: char my_string [BIG_ENOUGH]; sprintf (my_string," Content-Length:%d \ nn",BUF_SZ); HTHMacros are not substituted inside strings or inside comments. You canachieve what you want using sprintf like this:char my_string[BIG_ENOUGH];sprintf(my_string, "Content-Length: %d\n", BUF_SZ);HTH 这篇关于将DEFINE翻译成char *的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!