写宏遇到的问题:warning: backslash and newline separated by space - C

来源:互联网 发布:神曲 知乎 编辑:程序博客网 时间:2024/05/04 10:30
  原来是因为\ 后面多了一个空格

   附上一个刚刚写得调试用的例子:

[cpp] view plaincopy
  1. #define desay_debug(_string,myValue) \  
  2.     do{\  
  3.          c_snprintf(desay_info, \  
  4.                   250 - 1, \  
  5.                   "\ndesay: File: %s  Line#: %d  Func: %s()\n !!!:message is %s value is %d\n", \  
  6.                   __FILE__, \  
  7.                   __LINE__, \  
  8.                   __func__, \  
  9.                   _string, \  
  10.                   myValue); \  
  11.         desayEvent.ui4_msg_id=DESAY_MESSAGE_ID;\  
  12.         desayEvent.ui4_data1=(UINT32)&desay_info[0];\  
  13.         a_am_get_app_handle_from_name(&h_app_desay,"homepage");\  
  14.         c_app_send_msg(h_app_desay,0,&desayEvent,sizeof(DESAY_MSG_T),NULL,NULL);\  
  15.     }while(0) 
0 0
原创粉丝点击