Hungarian all the way. One variable per line. Initialize. Use Unicode Macros.
char* lpszText = NULL;
LPTSTR lpszText = NULL;
char * name;
Other (plz post)
This is a discussion on Which do you use? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hungarian all the way. One variable per line. Initialize. Use Unicode Macros. char* lpszText = NULL; or LPTSTR lpszText = ...
I always go for as few words as possible, and always c-style lowercase:
...and I never use truncated words if at all possible (which is mainly why I hate hungarian so much). What's more clear, anyway? LPCSTR lpszCmdLine or const char * command_line?
24bbs.cppCode:if( numeric_limits< byte >::digits != bits_per_byte ) error( "program requires bits_per_byte-bit bytes" );
char* CmdLine;Originally posted by Sebastiani
What's more clear, anyway? LPCSTR lpszCmdLine or const char * command_line?
I've started with Win32 API this week and I can't understand why they call char pointers like LPSTR. It just doesn't make sense to me. I know more or less what it stands for but... It's not a pointer to a string, it's a pointer to a char!
And putting lpsz before the name? Crazy!
Something I didn't say in my original post is also that I use char* becouse when I'm reading it's like:
char pointer called name. Clear.
i think something like: char, ok, oh, wait, it's a char pointer called name. Takes me much longer to read believe it or not. Or at least to understand
Last edited by -=SoKrA=-; 02-05-2003 at 03:53 PM.
SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
I say what I say, I mean what I mean.
IDE: emacs + make + gcc and proud of it.