Quote:
Originally posted by rwaliany
Microsoft tends to add BS additions to their windows gui to make it look hard and make themselves look original.
LPCSTR
isnt that like
const char*
I prefer const char*, I dont know about you.
|
Take out the const and you're right. LPCSTR is never meant to be used by itself; you are always supposed to use LPCTSTR, so that code will automatically work under either Unicode or Ansi.
Also, using typedef in cases like this adds another layer of abstraction, which is a "good thing" from a software engineering view. Because this is translated directly into char * at compile-time, it's also one of the few abstractions that doesn't detract from performance.
That said, I never touched the MS-specific ones, except when dealing with MFC/API functions, while writing either RoboGUI or RoboEmu. Both use char * and I wouldn't have it any other way.