例如:
// This will become either SomeMethodA or SomeMethodW,
// depending on whether _UNICODE is defined.
SomeMethod( _T( "My String Literal" ) );
// Becomes either AnotherMethodA or AnotherMethodW.
AnotherMethod( _TEXT( "My Text" ) );
两个我都见过。_T 似乎是为了简洁而 _TEXT 是为了清楚起见。这仅仅是程序员的主观偏好还是比这更具技术性?例如,如果我使用一个而不是另一个,我的代码不会针对特定系统或某些旧版本的头文件编译吗?