Creation and use of vectors in C++ #TC1017 #Mastery23

Creation and use of vectors in C++ 1017 23

Vector is a template class that is a perfect replacement for the good old C-style arrays. It allows the same natural syntax that is used with plain arrays but offers a series of services that free the C++ programmer from taking care of the allocated memory and help operating consistently on the contained objects.

The first step using vector is to include the appropriate header:

 

  1. using namespace std;
  2. //…
  3. vector v;

Here is my link

https://www.dropbox.com/s/m0popqb0mg8qbxo/Mastery23.mov?dl=0

Is a short video explaining a really easy vector 🙂 

Here is other link about vectors :D:

http://www.cplusplus.com/reference/vector/vector/vector/

http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4027/C-Tutorial-A-Beginners-Guide-to-stdvector-Part-1.htm

CC BY 4.0 Creation and use of vectors in C++ #TC1017 #Mastery23 by Alejandra Jacobo Gómez is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.