whats the different between two multidimensional vector and array?
You could see it as rows and columns, as Excel is built.
It is a useful when you want to structure things for easy access.
So for the 2D vector in the code below you have 100 rows and 100 columns.
So if you write: Value
You are accessing the first row in the 10:th column.
Hope this helps to understand.
std::vector<std::vector<string> > Value(100, std::vector<string>(100));
Remember, of course, that in C++ everything is zero-based. So Value is the second row and the eleventh column.
A vector, as Jennifer84 demonstrates, is a superior construct, since you get all the benefits of an array without any of the drawbacks.
[EDIT] Oh yeah, almost forgot to answer your Q. A vector is a "container class" in the STL. Read what the C++ FAQ has to say about it here.
I have an Epson receipt printer (Model number: TM-T88V), but I cannot use it. I do not have a POS (point of sale) software that will let me do what ...
This code generates an ascii maze of up to size 30x30. If you try to generate a larger maze then you will likely run out of stack space. There is ...
I have a datatable in Winforms.
I am currently trying to find the max and min values for each of the columns for each row. My table layout is like ...