Changes between Version 31 and Version 32 of Hacking
- Timestamp:
- 01/14/21 09:50:50 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Hacking
v31 v32 288 288 }}} 289 289 290 Avoid initialized and not initialized variables in one declaration. 291 292 '''This is right:''' 293 {{{ 294 int a; 295 int b = 0; 296 }}} 297 298 '''This is wrong:''' 299 {{{ 300 int a, b = 0; 301 }}} 302 303 Avoid several non-trivial variable initializations in one declaration. 304 305 '''This is right:''' 306 {{{ 307 int a = 2 + 5; 308 int b = 4 * 3 - 1; 309 }}} 310 311 '''This is wrong:''' 312 {{{ 313 int a = 2 + 5, b = 4 * 3 - 1; 314 }}} 315 290 316 === Helper variables === 291 317