[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: #ifdef considered harmful (was Re: WinCE?)
- From: "Michael T. Richter" <mtr@...>
- Date: Tue, 17 Nov 1998 16:07:29 +0000
>> This would turn the original block of code into this:
>> #ifdef WIDE_CHARACTERS_IN_USE
>> fwprintf(stderr, _T("OOPS! Bad thing just happened!"));
>> #else
>> fprintf(stderr, _T("OOPS! Bad thing just happened!"));
>> #endif
> Please, please, never use #ifdef in code, only in header files.
> It's much better to try, e.g,
[example snipped]
Agreed. My bad.
--
Michael T. Richter <mtr@ottawa.com> http://www.igs.net/~mtr/
PGP Key: http://www.igs.net/~mtr/pgp-key.html
PGP Fingerprint: 40D1 33E0 F70B 6BB5 8353 4669 B4CC DD09 04ED 4FE8