[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]
When compare values, try to put constant or returned value from function call into left side - make it as l-value.
This habit can prevent you from mistake - using '=' instead of '=='.
(Compiler can detect this error(mistake)!)
#define X_VAL (100) ... if( a == X_VAL ) { ... } // This is not good! if( X_VAL == a) { ... } // Better
'Language > C&C++' 카테고리의 다른 글
[C/C++] Remind! Multiple-Inheritance of same-named-method from two classes. (0) | 2007.03.18 |
---|---|
[C/C++] Remind! '>>' extends sign bit (0) | 2007.01.11 |
[C/C++][Tip] Using long and important 'enum'.. (0) | 2006.12.03 |
[C/C++][Tip] Macro... (0) | 2006.11.17 |
[C/C++] Unrolling loop. (0) | 2006.11.10 |