Solved

newbie question about _T

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 84
Unix / Linux grid computing 5 169
WinWaitActive parameters 12 31
zeroFront challenge 7 123
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.

749 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