Difference between revisions of "Best Practices"

From CDOT Wiki
Jump to: navigation, search
(Best Practices with Modern C++)
(Using Modern C++)
 
Line 6: Line 6:
 
* Use std::vector instead of a dynamic array (#include <vector>)
 
* Use std::vector instead of a dynamic array (#include <vector>)
  
* Use std::string instead of char* arrays (#include <string>
+
* Use std::string instead of char* arrays (#include <string>)

Latest revision as of 10:33, 17 January 2015

Using Modern C++

When using Modern C++ (C++ 11 and beyond), some of the best practices are given here:


  • Use std::vector instead of a dynamic array (#include <vector>)
  • Use std::string instead of char* arrays (#include <string>)