Solved

__T()

Posted on 2000-03-08
2
372 Views
Last Modified: 2006-11-17
Hi.
VC has a macro: __T() that's suppose to make life easier when switching between unicode/mb builds.
What does it do? I thought it'l map to L on unicode builds, but according to the sources - it just maps to nothing.

What's up?
0
Comment
Question by:AssafLavie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 2597667
You are right:

#define __T(x)      L ## x

the above line can be found in 'tchar.h' - the catch it that

#define __T(x)      x

This is controlled by the 'UNICODE' symbol that has to be defined or not, depending on what you want to use. In short:

#ifdef UNICODE
#define __T(x)      L ## x
#else
#define __T(x)      x
#endif

('tchar.h' boiled down to '__T()' ;-)

Feel free to ask if you need more information
0
 
LVL 4

Author Comment

by:AssafLavie
ID: 2597894
Hmm yea.
I guess I missed that #if in the source file.
Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question