Changes between Version 17 and Version 18 of code/C++_styleguide
- Timestamp:
- Sep 19, 2008, 1:52:21 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/C++_styleguide
v17 v18 71 71 Place machine-dependent code in a special file so that it may be easily located when porting code from one machine to another. 72 72 73 === 80 Columns tops ===74 If you can help it, try to keep your code within 80 character columns, 120 tops otherwise. [[br]]75 ''Comment: 80 columns is a common dimension for editors, terminal emulators, printers and debuggers, and files that are shared between several people should keep within these constraints. It improves readability when unintentional line breaks are avoided when passing a file between programmers.''76 77 73 === Include Guard === 78 74 Header files must contain an include guard. … … 92 88 /** 93 89 @file 94 @brief 95 A brief description. 96 More description.90 @brief A brief description. 91 92 More description... 97 93 */ 98 94 }}} … … 301 297 while (!done) 302 298 { 303 doSomething();304 done = moreToDo();299 doSomething(); 300 done = moreToDo(); 305 301 } 306 302 }}} … … 311 307 class SomeClass : public BaseClass 312 308 { 313 public:314 void functionBla();315 316 protected:317 ...318 319 private:320 ...309 public: 310 void functionBla(); 311 312 protected: 313 ... 314 315 private: 316 ... 321 317 }; 322 318 }}} … … 328 324 void functionBla() 329 325 { 330 ...326 ... 331 327 } 332 328 }}} … … 337 333 if (condition) 338 334 { 339 ...335 ... 340 336 } 341 337 else