?
Solved

__T()

Posted on 2000-03-08
2
Medium Priority
?
375 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

765 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