yes, ppl it's
std:: vector
let me know that .
I think the difference between the *abstract* definitions of those
terms is a bit ambiguous, so I'm not going to comment on them.
If you are talking about
std::vector<int> a;
vs.
int a[10];
there are big differences between the two. The latter is a contiguous
chunk of memory of size sizeof(int) * 10 (or, more generally, sizeof
(T) * N, where T is the type of the elements and N is the number of
elements). You can then access a particular element by specifying its
relative position as an integer subscript, or by setting up a pointer
to the array and performing arithmetic on that pointer. This array
can't be resized; once allocated, it remains with the same size for
the rest of its lifetime. In C, the only way to work around this
limitation is allocating the array dynamically:
int* a = malloc(sizeof(int) * 10);
and then later resizing it with realloc:
int* new_a = realloc(a, sizeof(int) * 20);
std::vector is a high-level abstraction that provides automatic
resizing and other functionality through methods. Also, as others have
pointed out, std::vector is only available in C++, not in C.
Sebastian