//第一種情況作為stringizing operator(#),叫字串化。
#define stringer( x ) printf( #x )
/* 第二種情況作為char operator(#@) 叫做字元化 */
#define charger(x) #@x
/* 第三種情況作為token-pasting operator(##) 叫做連線符 */
#define token(x) (x##x)
int _tmain(int argc, _tchar* argv)
{//
stringer( in quotes in the printf function call\n );
// stringer( "in quotes when printed to the screen"\n );
// stringer( "this: \" prints an escaped double quote" );
// //
// 第二種情況
// cout<< "第二種情況"// cout // // 第三種情況,連線符
// cout << "第三種情況"/ printf("aaa%c", token(a));
c語言中的 號和 號的作用
c語言中的 號和 號的作用 2013 06 23 18 04 15 分類 c c 一 一般用法 我們使用 把巨集引數變為乙個字串,用 把兩個巨集引數貼合在一起.用法 i nclude i nclude using namespace std define str s s define cons a,...
c語言中的 號和 號的作用
一 一般用法 我們使用 把巨集引數變為乙個字串,用 把兩個巨集引數貼合在一起.用法 i nclude i nclude using namespace std define str s s define cons a,b int a e b int main 二 當巨集引數是另乙個巨集的時候 需要注...
c語言中的 號的作用
c語言中的 號的作用 巨集中 和 的用法 一 一般用法 我們使用 把巨集引數變為乙個字串,用 把兩個巨集引數貼合在一起.用法 include include using namespace std define str s s define cons a,b int a e b int main 二...