Solved

newbie question about _T

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

746 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

12 Experts available now in Live!

Get 1:1 Help Now