diff --git a/guide/english/cplusplus/vector/index.md b/guide/english/cplusplus/vector/index.md index 4525103c10..987e774d00 100644 --- a/guide/english/cplusplus/vector/index.md +++ b/guide/english/cplusplus/vector/index.md @@ -104,13 +104,13 @@ std::string second_item = a[2]; // gets "element" Looping over elements in a C++ `std::vector` is pretty different from looping over elements in a vector in JavaScript or Ruby. Due to C++ being a thin abstraction of C, you can only loop over elements using these nifty little variables called iterators to access each element. Iterators often come in the form of pointers which are variables that store the memory address of another variable. You can learn more about pointers [here](https://www.tutorialspoint.com/cplusplus/cpp_pointers.htm). -However, because iterators act as pointers (or vice-versa), in order to see what they point to, you need to dereference it into a variable of the appropirate type. +However, because iterators act as pointers (or vice-versa), in order to see what they point to, you need to dereference it into a variable of the appropriate type. How do we do this? HERE. WE. GO! ```cpp std::vector a{"test", "element", "access"}; for(auto it = v.begin(); it != v.end(); it++) { //notice use of auto keyword - cout<<*it<