[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

LPTSTR

Posted on 2004-10-02
4
Medium Priority
?
3,030 Views
Last Modified: 2008-01-09
hi, could someone please explain - LPTSTR.
why,

 LPTSTR ptr;

and not...

 LPTSTR *ptr

a full explanation on  LPTSTR and how to
use it  would be greatly apriciated.

thanks..
0
Comment
Question by:mikem_2au
[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
  • 3
4 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 12209944
LPTSTR is a pointer type, a pointer to a string, or an array of TCHAR to be precise.
Depending of implementation, it can point to a ANSI or Unicode string.

You must not use LPTSTR * because it is a pointer itself:

typedef TCHAR * LPCTSTR;


0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 750 total points
ID: 12209954
Sorry, there is a typo:

LPTSTR is equivalent in fact to:
typedef TCHAR *LPTSTR;

And LPCTSTR (constant pointer) is equivalent to:
typedef const TCHAR * LPCTSTR;
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 12210039
Some complementary information here:
http://www.codetools.com/string/tconvert.asp
0
 

Author Comment

by:mikem_2au
ID: 12210247
thankyou for clearing that up for me.
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 tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

656 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