10th Sep 2018, 3:08 PM
Storm_CR
Storm_CR - avatar
6 odpowiedzi
+ 1
Your v1 and v2 are both empty.
10th Sep 2018, 7:04 PM
Sergey Ushakov
Sergey Ushakov - avatar
+ 1
It is default initialization. It is applied in case if there is no argument provided. You provided empty vector. So, default value wasn't applied.
11th Sep 2018, 6:08 PM
Sergey Ushakov
Sergey Ushakov - avatar
+ 1
vector<int> v1={1,2,3,4};
12th Sep 2018, 11:35 AM
Sergey Ushakov
Sergey Ushakov - avatar
0
Why? I initialized v2 by {1,2,3,4,5,6,7}
11th Sep 2018, 5:16 AM
Storm_CR
Storm_CR - avatar
0
So how to initialize vector correctly?
12th Sep 2018, 5:21 AM
Storm_CR
Storm_CR - avatar
0
Oh, thanks I just tried it but with v2, and didn’t understand why it isn’t working, so now I understand my fault:)
12th Sep 2018, 12:50 PM
Storm_CR
Storm_CR - avatar