0
What did the new int[2]
in
int* vetor = new int[2];
0
What did the new int[2]
in
int* vetor = new int[2];
2
It means that you are creating a 2 position vector, the value within the brackets indicates the size you want to use for vector creation.
Browser other questions tagged c++
You are not signed in. Login or sign up in order to post.
A memory area will be allocated that holds 2 int and vector will point to the beginning of this area.
– anonimo
It is a form embedded in the malloc(2 * sizeof(int)) language, which is how it would be done in C.
– epx