Solved

newbie question about _T

Posted on 2003-12-05
2
150 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 85
repeateFront java challenge 31 92
countEvens challenge 2 75
firstChar challenge 13 107
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…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

22 Experts available now in Live!

Get 1:1 Help Now