Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:25
kelprinc19-Jan-06 1:25 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 1:30
Owner drawn19-Jan-06 1:30 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:38
kelprinc19-Jan-06 1:38 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 1:43
Owner drawn19-Jan-06 1:43 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:46
kelprinc19-Jan-06 1:46 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 1:50
Owner drawn19-Jan-06 1:50 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:55
kelprinc19-Jan-06 1:55 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 2:01
Owner drawn19-Jan-06 2:01 
Aha here is the problem...
typedef struct 
{
	LPTSTR  shi502_netname;
} ap,*p;


ap a;
p p1 = &a;
p1->shi502_netname = _T("test");
LPTSTR h = p1->shi502_netname ;
TCHAR* var = h;
cout<<var<<endl;


It works with the modifications that I made. You have to make another typedef along with *p i.e ap. If you don't what are you going to assign to a variable of type p. p needs an address of a struct of it's own type.

An advice: Please provide some meaningful names for variables and specially typedefs.

Jesus LovesRose | [Rose]
<marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner DrawnRose | [Rose]
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is LordRose | [Rose]

QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 2:11
kelprinc19-Jan-06 2:11 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 2:18
Owner drawn19-Jan-06 2:18 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 2:27
kelprinc19-Jan-06 2:27 
AnswerRe: TCHAR* and LPTSTR Pin
Prakash Nadar19-Jan-06 5:00
Prakash Nadar19-Jan-06 5:00 
AnswerRe: TCHAR* and LPTSTR Pin
kakan19-Jan-06 2:21
professionalkakan19-Jan-06 2:21 
GeneralRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 2:24
kelprinc19-Jan-06 2:24 
GeneralRe: TCHAR* and LPTSTR Pin
kakan19-Jan-06 2:28
professionalkakan19-Jan-06 2:28 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 2:30
kelprinc19-Jan-06 2:30 
AnswerRe: TCHAR* and LPTSTR Pin
David Crow19-Jan-06 2:56
David Crow19-Jan-06 2:56 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 3:20
kelprinc19-Jan-06 3:20 
AnswerRe: TCHAR* and LPTSTR Pin
David Crow19-Jan-06 3:23
David Crow19-Jan-06 3:23 
AnswerRe: TCHAR* and LPTSTR Pin
Prakash Nadar19-Jan-06 4:56
Prakash Nadar19-Jan-06 4:56 
Questionchange the base class after finishing project Pin
Anu_Bala19-Jan-06 0:53
Anu_Bala19-Jan-06 0:53 
AnswerRe: change the base class after finishing project Pin
toxcct19-Jan-06 1:00
toxcct19-Jan-06 1:00 
AnswerRe: change the base class after finishing project Pin
Owner drawn19-Jan-06 1:00
Owner drawn19-Jan-06 1:00 
GeneralRe: change the base class after finishing project Pin
Anu_Bala19-Jan-06 1:03
Anu_Bala19-Jan-06 1:03 
GeneralRe: change the base class after finishing project Pin
Owner drawn19-Jan-06 1:04
Owner drawn19-Jan-06 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.