Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

newbie question about _T

Posted on 2003-12-05
2
Medium Priority
?
158 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 400 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Screencast - Getting to Know the Pipeline
Suggested Courses

876 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