Changes between Version 5 and Version 6 of CodingGuidelines
- Timestamp:
- Mar 29, 2012, 10:17:07 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingGuidelines
v5 v6 43 43 == Some hints on good code vs. bad code == #code-good-bad 44 44 45 === end of stream checking === #code- -good-bad_eof45 === end of stream checking === #code-good-bad_eof 46 46 47 47 Using … … 75 75 This involves some extra typing but ensures that in case of faulty streams the error is properly pointed at. 76 76 77 === Use of new/delete === #code--good-bad_new-delete77 === Use of new/delete, return === #code-good-bad_new-delete 78 78 79 === Use of return === #code--good-bad_return 79 The new and delete statements are written without brackets, they are __not__ functions, i.e. 80 {{{ 81 new pointer; 82 new array[3]; 83 delete pointer; 84 delete[] array; 85 }}} 80 86 81 The return statement should look like this 87 === Use of return === #code-good-bad-return 88 89 The return statements should look like this 82 90 {{{ 83 91 return bar;