User Tools

Site Tools


best_practices

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
best_practices [2016/03/14 12:31] jmgrbest_practices [2023/04/25 16:52] (current) – external edit 127.0.0.1
Line 5: Line 5:
 ==== Tips & tricks ==== ==== Tips & tricks ====
  
-=== Always initialise primitive variables (other types do not require this) ===+=== Always initialize primitive variables (other types do not require this) ===
  
 <code cpp> <code cpp>
Line 14: Line 14:
 // Good // Good
 int myVariable{}; int myVariable{};
-std::string myString; // std::string is not a primitive variable, so initialisation is optional+std::string myString; // std::string is not a primitive variable, so initialization is optional
 </code> </code>
  
best_practices.txt · Last modified: 2023/04/25 16:52 by 127.0.0.1