Difference between revisions of "Best Practices"

From CDOT Wiki
Jump to: navigation, search
(Created page with '= Best Practices for OOP345 = * Use std::vector instead of a dynamic array (#include <vector>) * Use std::string instead of char* arrays (#include <string>')
 
(Using Modern C++)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
= Best Practices for OOP345 =
+
= 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::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 09: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>)