Hungarian all the way. One variable per line. Initialize. Use Unicode Macros.
char* lpszText = NULL;
or
LPTSTR lpszText = NULL;
char* name;
char *name;
char * name;
Other (plz post)
Hungarian all the way. One variable per line. Initialize. Use Unicode Macros.
char* lpszText = NULL;
or
LPTSTR lpszText = NULL;
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.
I always go for as few words as possible, and always c-style lowercase:
bool open;
double total_elements;
...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?
*humph*
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
char* CmdLine;Originally posted by Sebastiani
What's more clear, anyway? LPCSTR lpszCmdLine or const char * command_line?
*humph*
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* name;
char pointer called name. Clear.
char *name;
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.