Solved

newbie question about _T

Posted on 2003-12-05
2
155 Views
Last Modified: 2013-11-20
What does it really mean?
I've seen it in a lot of places but haven't figured out what it does,
for example _T("someString");
0
Comment
Question by:Nick_72
[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 44

Accepted Solution

by:
Karl Heinz Kremer earned 100 total points
ID: 9886105
The _T macro will convert your strings to the correct format. This is important if you compile multi-byte or Unicode programs. You can always use the _T macro - just get in the habit of using it: If you compile an ASCII application, it will not convert your strings, but if you decide to convert your application to a Unicode app, the strings are already tagged correctly.

If you type "this is a string", the compiler will create a character array for it: Every character is one byte. This of course means that you cannot use this string in an Unicode environment. You need to tell the compiler that your string should be stored so that every character will occupy two bytes. The _T macro does this.
0
 
LVL 9

Author Comment

by:Nick_72
ID: 9886439
Excellent...thanks.
0

Featured Post

Independent Software Vendors: 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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

696 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