Solved

__T()

Posted on 2000-03-08
2
366 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now