Joiner##

xiaoxiao2021-03-06  91

Often use _t () macro, how come it comes? Look with VA, original _t is __t

#define _t (x) __t (x)

Take a look __t

In tchar.h

#ifdef _unicode

#define __t (x) l ## x

#ELSE

#define __t (x) x

#ENDIF

So, what is this ## 是? It turns out that it is a connection, connects the expression of the left and right sides of the left and right to one. For example, in the _unicine environment,

_T ("unicode") == L "unicode"

However, it should be noted that the macro is identified by the compiler in the compile stage, so it cannot be indicated to the connection function when the program is running. For example::

INT A0, A1, A2, A3;

For (int i = 0; i <4; i )

{

A ## i = i;

}

This code cannot be compiled.

转载请注明原文地址:https://www.9cbs.com/read-123809.html

New Post(0)