Danny Kalev explains how to use the new brace-initialization notation, class member initializers, and initialization lists to write better and shorter code, without compromising code safety or efficiency. A vector is similar to an array, in a sense where a series of elements are stored with the same variable name. But let's say you have some code that needs the memory to be freed up immediately. A. This is about vector and list - part 1. Similar structures can be For example see LodePNG's analog of std::vector for C. The C++ STL (Standard Template Library) is a powerful set of C++ template classes to provide general-purpose classes and functions with templates that implement many popular and commonly used algorithms and A typical vector implementation consists, internally, of a pointer to a dynamically allocated array, and possibly data members holding the capacity and size of the vector. end(); ++p) process(*p); If you change your choice from a vector to a list then the code is almost identical. A B R A B R B A Figure A. 30 試食版は、当社の製品である MS-DOS 用セルフCコンパイラ LSI C-86 Ver 3. Supported values of n are 2, 3, 4, 8, and 16 for all vector data types. While the Standard C++ ``container'' classes are mainly useful for dealing with lists C++ vector memory and 2D vectors. In R, you can combine a vector with itself if you want to repeat it, but if you want to repeat the values in a vector many times, using the c() function becomes a bit impractical. May 09, 2014 · When interfacing with C from C++, you have to consider how you transfer data between the C and the C++ domains. Discuss how to create vectors of numeric, logical and character string data types. You can use them on your web, for prints or to design a unique T-shirt. equals(v) O(N) Returns true if the two vectors contain the same elements in the same order. standard arrays. Schmidt Professor Department of EECS Vector &product (const Vector &v, const Matrix &m) The vector class. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects. To use the vector class you must #include <vector>. If you want to use any of the algorithms provided by the STL, you also need to include the algorithm header. I can find the ones of the same rank, but I don't know how to get them out. Constructs a vector, initializing its contents depending on the constructor version used: C++98; C++11. Posts about distance vector routing program in c written by Rajesh Hegde C++ Support for Abstract Data Types Douglas C. R makes life easier by offering you a function for repeating a vector: rep(). You can name some elements of a vector and leave others blank: c vector display « vector « C++ Tutorial. References A starting page on Wolfram MathWorld is Vector Multiplication . 12. vector<std::vector<int>> in C++ if I already know the sizes of the 2D vector? It enables fast random access to any element, and dynamic additions and removals to and from the sequence. This is a vector: A vector has magnitude (size) and direction: so c is a vector, it has magnitude and direction ; but c is just a value, like 3 or 12. If α is not algebraic, the dimension of Q(α) over Q is infinite. We assume that you are already familiar with vectors in R 2 and R 3 cu is a vector in R n. v->size = 0;. This c programming code is used to find the magnitude of vector . If unit vectors A unit vector is a vector of length one. An iterator is used to move thru the elements an STL container (vector, list, set, map, ) in a similar way to array indexes or pointers. If the current vector capacity has been exhausted when an addition has been requested the size is doubled and the vector contents re-allocated. 4 All the properties of theorem 4. begin(); p!=c. C++ Support for Abstract Data Types Douglas C. store(c); // save result in array c Example 1b does the same as example 1a, but more efficiently because it utilizes SIMD instructions that do eight additions and/or eight multiplications in a Each vector has a magnitude The faculty expect the set of vectors to evolve over time and plan to introduce or modify vectors as they see new directions for the وکتور vector یکی از کلاس های خیلی خوبه سی پلاس پلاس است که استفاده از آن نوشتن خیلی از برنامه ها رو آسان می کند [] Shorthand for writing Vector3(float. Learning R by Richard Cotton. Vectors usually occupy more space than static arrays, because more memory is allocated to handle future growth. In this article will discuss how to create 2D Matrix using vector of vectors in c++. e. When you use C++ STL, it takes care of freeing up memory after a variable goes out of scope. 2 The resultant vector R = A + B A B R B Figure A. Vectors are sequence containers representing arrays that can change in size. {. (STL) · Ways to copy a vector in C++ · Map in C++ Standard Template Library (STL) Ways to copy a vector in C++. In the days before c++ and vector/lists, how did they expand the size of arrays when they needed to store more data? Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by the container. 13 Vector Functions 13. 2017 std::vector ist ein sequentieller Container, der Arrays dynamischer Größe kapselt. Our Vector Editor is officially done! Now you can edit files before downloading them. Length and LengthSquared sh, ID #16990599 Complete Example of Vector in Java: (Collection c): It Removes all those elements from vector which are present in the Collection c. Download 75 Royalty Free C & Architect Vector Images. 4 Shift A. To my surprise there were none. In this case, std::string and std::vector are your best friends and these are what you should use by default. The std:: In R, you can combine a vector with itself if you want to repeat it, but if you want to repeat the values in a vector many times, using the c() function becomes a bit impractical. Schmidt Professor Department of EECS Vector &product (const Vector &v, const Matrix &m) This tutorial introduces you to C array, show you how to declare arrays and how to manipulate elements of an array effectively. This is sometines referred to as the "Tip-to-Tail" method. ) In this article we will discuss different ways to initialize a vector in C++. I know I can dynamically create the size I need upfront, but is it cvec. store(c); // save result in array c Example 1b does the same as example 1a, but more efficiently because it utilizes SIMD instructions that do eight additions and/or eight multiplications in a The sum of two vectors, A and B, is a vector C, which is obtained by placing the initial point of B on the final point of A, and then drawing a line from the initial point of A to the final point of B , as illustrated in Panel 4. Theorem 4. e. It tests six scenarios: a) preallocated C array; b) dynamically growing C array; c) dynamical C vector calling kv_a macro (in my kvec. Apr 10, 2011 · Hello. Appending and removing elements at the end of the array is very fast. Vectors for Beginners: Starts at declaration and runs through some basic functions with examp. You can use the rep() function in several ways. A vector is a collection of data items of the same type. This tutorial is meant to help beginning and intermediate C++ programmers get a grip on the standard template class. (since C++03) Vectorソフトウェアライブラリに収録されているソフトのカテゴリ別一覧ページです。人気順、新着順、名前順にてソフトを The Vector class implements a growable array of objects. This guide should walk you through the creation of a reusable Vector3 type in c# and the mathematics behind it all. h>. The size of the vector refers to the actual number of elements, while the capacity refers to the size of the internal array. Matrix Classes in C++ - The Header File. NegativeInfinity, float. Apr 10, 2011 · A new feature in the upcoming revision to the C++ standard will allow you to initialize the vector in the same way as an array, like this: vector<string> fruit = { "apple", "banana", "orange", "strawberry" }; But this feature is not yet widely supported, try it on your compiler and see. Also, you don’t have to declare the size of a vector. To do so, use a linked list. v->data = NULL;. You refer to individual elements of a two-dimensional vector by using two subscripts. 5 Let v be a vector in Rn and let c be a scalar. Varun November 27, 2015 Creating a Matrix using 2D vector in C++ – Vector of Vectors 2015-11-27T00:17:22+00:00 std::vector, STL No Comment In this article will discuss how to create 2D Matrix using vector of vectors in c++. Learn more now! Creating a Two Dimensional Vector - posted in C/C++ Tutorials: This tutorial will show you how to create a vector matrix, much like an array matrix, for storing data in a two dimensional format. Length and LengthSquared sh, ID #16990599 The best selection of Royalty Free C & Architect Vector Art, Graphics and Stock Illustrations. We also takes written and practical test of our students which helps them to become an ソフト詳細説明 LSI C-86 Ver 3. Free Vector Art For All Browse Vector Packs Browse All Vectors IHeartVector offers hundreds of FREE vector that you may use in your personal and commercial designs. The vector<> template is part of the standard C++ library; it was originally part of the "standard template library". Ways to copy a vector in C++; Sorting 2D Vector in C++ | Set 3 (By number of columns),(Sort in descending order by first and second) Vectors. k. Vectors are declared as in this example: vector<int> ivec(4); C++ Vector Tutorial: Constructors, accessing elements, and getting internal state informati Home Blog Projects CV Contact A simple vector library in C++. Creating a vector object without any initialization will create an empty vector with no elements i. The code is not designed to be fast or Thus, C is a two-dimensional R-vector space (and, as any field, one-dimensional as a vector space over itself, C). Unlike arrays, vectors are dynamically sized, which is a major advantage. Pass and return vector from/to function c++- C/C++ Help. Unlike member vector::begin, which returns an iterator to this same element, this function returns a direct Vector Institute offers high quality advanced Embedded course with Embedded C. c: Just get lodepng. (The article was updated. Edit Before You Download. #include "vector. NegativeInfinity, float Returns a vector that is made from the smallest components of two This tutorial will show you how to create a vector matrix, much like an array matrix, for storing data in a two dimensional format. ad by Triplebyte. The vector is the preferred container for a sequence when random-access performance is at a premium. When compared with Raster images, Vector images (SVG image types) have the following advantages. However, unlike arrays, they cannot store primitive data types. The 'vector' allows the type of object contained within the vector to be specified. Vector is usually the first sequence to be learned. void vector_init(vector *v). Requirement. Vectors and Matrices Appendix A Vectorsandmatricesarenotationalconveniencesfordealingwithsystemsoflinearequationsandinequalities. void setElementAt The best selection of Royalty Free C & Architect Vector Art, Graphics and Stock Illustrations. For more information about the class vector, see vector Class. However, they are often misunderstood. A C++ tutorial about 'Vectors' The above loop shows the array size (vector "capacity") expanding as the array is filled. In a similar fashion, upon deletion, if the vector is a quarter full the contents is reallocated to a vector of half the current size. The std namespace is also needed in order to have access to the names used in the STL for the classes and functions. // snip 1: std::vector<int> v(10); // snip 2: std::vector<int> v; v. One of the biggest stumbling blocks on moving to C from a high-level A dynamic array a. For information about the specialization vector<bool>, see vector<bool> Class. Wikipedia dot product, Chapter 9: Vectors and Arrays. Code, Example for Program to create vector in C++ Programming Feb 23, 2014 · Introduction Scalable vector graphics(SVG), has been widely popular currently in terms of rendering web graphics. We’re going to normalize and calculate the angles of a 2D vector at position (5,5) and a 3D vector at position (5,5,5). VectorCAST/C++ is a dynamic software testing tool that automates C and C++ unit testing, as well as the integration testing of C and C++ software units. Ive decided to cvec. Our compiler comes with an extensive library of classes called the Standard C++ Library. Then it will show how to create a simple Vector Library overloading the operators to perform dot product, scalar product, cross product, addition, subtraction, magnitude, scalar addition, and scalar subtraction. Just like arrays, vectors use contiguous storage locations for their elements, which means that their elements can also be accessed using offsets on regular pointers to its elements, and just as efficiently as in arrays. Let’s consider a vector v whose initial point is the origin in an xy - coordinate system and whose terminal point is . #include <stdlib. Implementing a Dynamic Vector (Array) in C 20 Jan 2014. Methods: add(value) O(1) Adds a new value to the end of this vector. Use for_each function to print all elements in a vector There are many open source implementations of STL. Ways to create arrays. Die Inhalte sollen in das neue Buch einfließen: C++-Programmierung/ 20 Jan 2014 Implementing a resizable, dynamic array data-type in C. Represent a 2D Matrix using vector in C++ i. Introducing C++ Vectors and Arrays. Jeff wrote: Hello-Ive never used a vector or vectors in C++ so I have a question for you all. More than 28 million people use GitHub to discover, fork, and contribute to over 85 million projects. Find a unit vector in the direction of u = ! 3,1. Free set of vector Golden an shiny casino chips Advertisements. 2 hold, for any three vectors u,v,w in n−space Rn and salars c,d. Example of a doubly linked list using STL. The * operator dereferences an iterator (ie, is used to access the element an iterator points to) , and ++ (and -- for most iterators) increments to the next eleme The vector $\vc{i}$ is the unit vector in the direction of the positive $x$-axis. Vectors have one important advantage with respect to C-style arrays: vectors can be resized during the execution of the program to accommodate any extra elements as needed, or even to “shrink” the vector. This is a short introduction to the standard vectors available in C++. h". 1. First of all remove is not a method of vector - it should be erase. std::vector. Vectors and Direction; Vector Addition; Resultants; Of the three vectors being added, vector C is clearly the nasty vector. Vectors are sequence containers representing arrays that can change in size. I checked out the C++ Standard Library book from my college to see if they had anything on 2D vectors. c(u + v) = cu + cv (c + d) C++11 multithreading tutorial - part 2 vector which is more in the spirit of C++11 and avoids the pitfalls of dynamical memory allocation with new and delete: Sep 25, 2008 · I've got a vector of a hand of cards, and I basically want to remove any cards of the same rank that are in the hand. Operations on vectors - addition, multiplication by a number. Die Elemente werden zusammenhängend gespeichert, was Diese Seite gehört zum alten Teil des Buches und wird nicht mehr gewartet. Standard Template Library (STL) and C++ examples. Vectors are a powerful yet simple data structure. c; with any colortype or interlace mode, into a 32-bit image in an std::vector at the output. These particular names are legal but many led by _ are not. This is a generic function which combines its arguments. picopng. vector « C++ Tutorial. com is a combination of C++ tutorials, compiler information, programming links, a VERY ACTIVE programming message board, and C and C++ source code . Instead, vector containers may allocate some extra storage to accommodate for possible growth, and thus the container may have an actual C++98; C++11 Construct vector. Adding to a vector for( list<T>::iterator p=c. v->count = 0;. Im trying to make a vector that will hold coordinates. 6. 1 ce a Sp ves Cur We have already seen that a convenient way to describe a line in three dimensions is to provide a vector that “points to” every point on the line as a parameter t varies, like Vector Spaces One of my favorite Thus, we deﬁne cAA(c≥ 0) to be the vector pointing in the same direction as Abut whose magnitude is ctimes the magnitude of A. vector display: 16. Like an array, it contains components that can be accessed using an integer index. Here's typical code that prints out everything in a vector: vector<int> v; vector<int>::iterator iter; v We can construct an ostream iterator from a C++ output Sequence Containers [] Sequences - easier than arrays Sequences are similar to C arrays, but they are easier to use. In C++, the slots of vectors Implementing a dynamically sized array in C. Hot Matrix Classes in C++ - The Header File. Now let’s spend some time learning more about vector and list, two of the most common sequence container types and they are worth extra exploring. Definition and Properties. end(); ++p) process(*p); Vector iterators have type vector<T>::iterator and used like this: for( vector<T>::iterator p=c. cpp and rename it to lodepng. Actually, as we were discussing in another tread, you could actually kind of use a vector. Vectors and Arrays. 17. They only store object references – they point to the objects that contain the data instead of storing the objects themselves. In a C++/CX program, you can make free use of Standard Template Library (STL) containers, or any other user-defined collection type. I should start off by saying that if you are planning to do any serious work which requires vector mathematics, you should probably just use one of the many open source libraries or packages: Get expert answers to your questions in C and more on ResearchGate, the professional network for scientists. A normalized vector is also known as a unit vector. C++ Tutorial; vector; vector display; 16. GitHub is where people build software. In computer science, array programming languages (also known as vector or multidimensional languages) generalize operations on scalars to apply transparently to vectors, matrices, and higher-dimensional arrays. An actual vector implementation in C might use void* pointers as elements rather than int, so the code is more generic. We are using templates and typdefs to make Vec be the name of a vector class with vector components made from doubles. This means that a pointer to an element of a vector may be passed to any function that expects a pointer to an element of an array. Introduction to C Programming Arrays Overview. \b Vector2D class is representing cartesian mathematical vector in two dimensional space. . An R tutorial on the concept of vectors in R. The * operator dereferences an iterator (ie, is used to access the element an iterator points to) , and ++ (and -- for most iterators) increments to the next element. A vector is similar to an array, but vectors provide some operations that cannot be performed using C++ arrays, and vectors can be passed both by value and by reference (unlike C++ arrays, which are always passed by reference). vector ( 22 ) 16. And we are defining Mat to be a vector the components of which are themselves doube-precision vectors. C++ vectors can grow dynamically, but not in all situations. vector: Dynamic array of variables, struct or objects. Home; C++ Tutorial; Language Basics; Data Types; Operators statements; C++ Tutorial; vector; 16. In the previous lesson, we introduced std::array, which provides the functionality of C++’s built-in fixed arrays in a safer and more usable form. You also learn about multidimensional arrays. Hi Abhishek, I just tried your solution to remove duplicates - as I was looking for that. get(index) O(1) Returns the element at the specified index in this vector. Rather, std::vector might allocate a new buffer, and then copy construct/move construct the objects (using placement new) into the new buffer. An knowledge of arrays, vectors, loops, and basic C++ programming is necessary to fully grasp the material covered in this tutorial. Vectors in R n. The C++ Standard Template Library (STL) contains a powerful set of data structures and algorithms. Vector elements are placed in contiguous storage so that they can be accessed and traversed using iterators. I am trying to create a vector with 4 strings in them. Introduction to STL; Sorting; Searching; Containers: Pair (); Vector () . returns the number of elements that can be held in currently allocated storage (public member function) A vector is just an array wrapped in a class that tracks certain details about it and provides methods to make it behave the way we all wish it would. #include <stdio. It enables random access, which means we can access each element directly with index. vector C++ vector memory and 2D vectors Vector constructors. I think to be an effective C++ programmer, one has to understand how the STL works, and so today I’m blogging about how its most commonly used component, vector, works. An array is a collection of data items, all of the same type, accessed using a common name. . This library is now standard with essentially all C++ compilers, so can now be viewed as an extension of the language. You can select the whole c code by clicking the select option and can use it. You can name some elements of a vector and leave others blank: c resultant vector D = A + B + C is shown in Fig. YoLinux: Linux Information Portal includes informative tutorials and links to many Linux sites. 30 から、「試食」のため In mathematics, physics, and engineering, a Euclidean vector (sometimes called a geometric or spatial vector, or—as here—simply a vector) is a geometric object A lot of free vector art and graphics ideal for your designs. C++ I would avoid the leading underscores on your attribute names. 1 , 1 , 1 , 1 What's the C# equivalent of C++ vector? I am searching for this feature: To have a dynamic array of contiguously stored memory that has no performance penalty for access vs. Common ways to create vectors (or one-dimensional arrays) include: > a <- c(3, 7, 9, 11) # Concatenates numeric values into a vector > a <- c("a", "b", "c") # Concatenates character strings into a vector > a <- 1:5 # Creates a vector of integers from 1 to 5 inclusive > a <- rep(1, times = 5) # Creates a vector of 5 How to use the C++ back() to return a reference to the last element of the vector and front() to return a reference to the first element in a vector in C++ programming Vectorization: Writing C/C++ code in VECTOR FormatMukkaysh SrivastavComputational Research Laboratories (CRL) - Pune, India Combine Values into a Vector or List Description. Note that you can cheat and get the same speed as a C++ new by constructing the vector empty, 34 thoughts on “Do not waste time with STL vectors Compute and display: a x (b x c), the vector triple product. begin() – Returns an iterator pointing to the first element in the vector . Quickstart sample (tutorial) that illustrates how to perform operations on Vector objects, including construction, element access, arithmetic operations in C#. I believe the latest version of GCC supports it. However it is difficult to read the STL code because it is meant to be practically usable than readable. There are many open source implementations of STL. C++ Source Code for a Vector - index based array of objects - implementation is given on this page with example This c programming code is used to find the magnitude of vector . Like arrays, they can store multiple data values. Aug. lodepng. How to use the C++ insert() to insert() an element or a number of elements into the vector at a specified position, begin() to return a random-access iterator to the first element in the container and end() to return a random-access iterator that points just beyond the end of the vector in C++ programming Jeff wrote: Hello-Ive never used a vector or vectors in C++ so I have a question for you all. An array is a primitive type, based on C, which is based on assembly, which is based on hardware Initializes a new vector storing n copies of the given value. 3 Shift B Figure A. (1) empty container constructor (default Vectors are same as dynamic arrays with the ability to resize itself automatically 1. (since C++03) The storage of the vector is handled automatically, being expanded and contracted as needed. Vector constructors. clear() O(1) Removes all elements from this vector. When you click text, the code will be changed to text format. To use vectors you must include the vector header file. #include <string. Represents a single vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms. The first string is "apple", second being "banana", third being "orange" and the fourth being "strawberry". vector<int> v(5); vector<vector<int> > v2(8,v); or you can do it in one line: vector<vector<int> > v2(8, vector<int>(5)); You can picture v2 as a two-dimensional vector consisting of eight rows with five integers in each row. A vector is a type of array you find in object oriented languages like C++. If we hadn't integers but some user-defined class, vector would call the default ctor 10 times and contain 10 readily constructed objects. This makes your code easier to modify. vector: 16. reserve(10); The first snippet defines a vector containing 10 integers, and initializes them with their default value (0). How do I create a 2D vector array using std:vector<>? Update Cancel. Jul 10, 2010 · This tutorial is intended to explain simple Vector Algebra. Just like arrays, vectors use contiguous storage locations for their elements, which Vector Arms home of the finest hand built firearms. Just download and enjoy. Every vector is fully customizable. Cprogramming. In GitHub is where people build software. For example, if you have a vector v of size 2, then v[10]=5; won't make the vector extend. However, the size of a Returns a reference to the first element in the vector. This c program code will be opened in a new pop up window once you click pop-up from the right corner. } int vector_count(vector *v). Initializing your objects, arrays, and containers is much easier in C++11 than it used to be in C++03. vector in cAlso note that there is nothing special about C++ vector/list. Combine Values into a Vector or List Description. Matrix Classes in C++ The most appropriate choices here are std::valarray and std::vector. Component Method of Vector Addition. An array (vector) is a common-place data type, used to hold and describe a collection of elements. Mar 30, 2006 · In C++, a vector is a template (or container) which defines an array of items. In coordinates, we can write $\vc{i}=(1,0)$. C[*,r] refers to the vector in row r. h); d) dynamical C vector calling kv_push macro (in my kvec. remove can be used with std::remove. C++ Vector Tutorial: Constructors, accessing elements, and getting internal state informati Algorithms. C++ has a vector class within the std namespace. I know I can dynamically create the size I need upfront, but is it Hi, Im having lots of problems trying to implement a vector of arrays in C++. An important part of IDL is the ability to work with data that is organized as vectors and arrays. a a vector does exactly Quickstart sample (tutorial) that illustrates the basic use of the Vector class for working with vectors in C#. While the Standard C++ ``container'' classes are mainly useful for dealing with lists C++ Source Code for a Vector - index based array of objects - implementation is given on this page with example How to use the C++ back() to return a reference to the last element of the vector and front() to return a reference to the first element in a vector in C++ programming A vector manages its elements in a dynamic array. The default method combines its arguments to form a vector. For years I have seen people struggle with vector mathematics. h); e) preallocated C++ vector and f) dynamically growing C++… You will have to fake using a vector in C. August 31, 2011. Search: Advanced Forum Search. I'm having trouble figuring out why some of my integers are behaving crazy. cpp. To use vectors in your code, you need the appropriate library - #include <vector>. I have a vector of vectors, declared as vector<vector<int> > ph; Sep 18, 2008 · Here is a piece of source codes that compare C arrays and C++ vectors. Hope you have already understood the concept of C++ Template which we have discussed earlier. vector in c Return array from function in C - Learn C programming in simple and easy steps starting from basic to advanced concepts with examples including C Overview, language basics, Environment Setup, Program Structure, Basic Syntax, literals, data types, Variables, Constants, Storage Classes, Operators, Decision Making, functions, Scope Rules, loops Benchmarking vector addition in C, C++ and Fortran Normalizing a vector can derive the direction of the vector in 2D or 3D space. Visit Dev Articles to discuss Pass and return vector from/to function c++ 4. However, when you pass collections back and forth across the Windows Runtime application binary interface (ABI)—for example, to a XAML control or to a JavaScript The vector data type is defined with the type name, that is, char, uchar, short, ushort, int, uint, float, long, or ulong followed by a literal value n that defines the number of elements in the vector. We can find unit vectors in any direction. So you still need to ensure that memory will be created for your vectors. This tutorial introduces you to C array, show you how to declare arrays and how to manipulate elements of an array effectively. Similarly, the vector $\vc{j}$ is the unit vector in the direction of the positive $y$-axis: $\vc{j}=(0,1)$. 24. In case of arrays, there is no much choice to copy an array into other, other than iterative method i. For instance, for α = π there is no such equation, in other words π is transcendental. it doesn’t need to be enclosed in quotes. The std:: C++’s Standard Template Library (STL) My personal experience is that the pair, the vector and the map are used more often than the other STL classes, Apr 03, 2008 · Alex K said. 4 ; C++ Week 6 Vectors. VECTORS IN RN 119 Theorem 4. Earlier, C++: STL: Iterators for vector An iterator is used to move thru the elements an STL container (vector, list, set, map, ) in a similar way to array indexes or pointers. I also did some research on the net to find anything 2D vector related and that didn't turn up anything. In particular, they are useful for compactly representing and discussing the linear programming problem: Initializing your objects, arrays, and containers is much easier in C++11 than it used to be in C++03. e running a loop to copy each Unlike arrays, vectors only store object references – they point to the objects that contain the data instead of storing the objects themselves. The post-fixed 3 simply refers to the vector being in 3-dimensions (x,y,z)