Top "Vector" questions

A vector is a single-dimensional array: it contains components that can be accessed using an integral index.

How to avoid memory leaks when using a vector of pointers to dynamically allocated objects in C++?

I'm using a vector of pointers to objects. These objects are derived from a base class, and are being dynamically …

c++ stl pointers vector derived
2D Euclidean vector rotations

I have a euclidean vector a sitting at the coordinates (0, 1). I want to rotate a by 90 degrees (clockwise) around the …

c++ math vector rotation trigonometry
Convert R vector to string vector of 1 element

Im working with the programming language R now. I have a vector: a <- c("aa", "bb", "cc") And …

string r vector arguments system
Convert a vector<int> to a string

I have a vector<int> container that has integers (e.g. {1,2,3,4}) and I would like to convert to …

c++ vector tostring
What are the differences between vector and list data types in R?

What are the main differences between vector and list data types in R? What are the advantages or disadvantages of …

list r vector
When vectors are allocated, do they use memory on the heap or the stack?

Are all of the following statements true? vector<Type> vect; //allocates vect on stack and each of the …

c++ stl vector stack heap
Compute Median of Values Stored In Vector - C++?

I'm a programming student, and for a project I'm working on, on of the things I have to do is …

c++ vector median
how to calculate the Euclidean norm of a vector in R?

I tried norm, but I think it gives the wrong result. (the norm of c(1, 2, 3) is sqrt(1*1+2*2+3*3), but it returns 6.. …

r vector statistics
How to return 5 topmost values from vector in R?

I have a vector and I'm able to return highest and lowest value, but how to return 5 topmost values? Is …

r vector topmost
how do you insert the value in a sorted vector?

ALL, This question is a continuation of this one. I think that STL misses this functionality, but it just my …

c++ sorting vector stl insertion-sort