can anyone explain to me what is: 'T', 'L', 'wchar_t', 'LPCWSTR' and 'LPCTSTR'?
how can i convert strings\char* to these types?
(i understand these isn't a tutorial, but i realy need these introdution)
or you can give me just a nice link.
cambalinho
125
Practically a Posting Shark
Recommended Answers
Jump to Post_T() is the same as _TEXT(), which converts a string literal to UNICODE, for example _TEXT("Hello World"); Those two macros do nothing for character arrays. These macros are translated at compile time as either wide characters (wchar_t*) or normal ascii characters (char *).
L is not a macro but forces …
Jump to PostYou can't. Those are macros that work only on string literals -- text within quotes such as "Hello World". You have to call a conversion function to convert char* to wchar_t*. Study the link I gave you.
Jump to Posti have the windows.h include, but the 'L' where is declared?
or i must declare it?The prepend
L
is a feature of the C language itself, and is implemented inside the compiler; there is no definition for it. If you think it through, this has to be …
Jump to Postwindows.h should be sufficient. There are a lot of other macros in tchar.h. My preference is to (almost) never use L because L is not portable between UNICODE and non-UNICODE programs, while the _T() and _TEXT() macros are. If you use _T() you can turn UNICODE on and off without …
All 13 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
cambalinho
125
Practically a Posting Shark
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
cambalinho
125
Practically a Posting Shark
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
cambalinho
125
Practically a Posting Shark
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
cambalinho
125
Practically a Posting Shark
cambalinho
125
Practically a Posting Shark
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
cambalinho
125
Practically a Posting Shark
cambalinho
125
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.