0
I have a problem
6 odpowiedzi
+ 1
Your v1 and v2 are both empty.
+ 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.
+ 1
vector<int> v1={1,2,3,4};
0
Why? I initialized v2 by {1,2,3,4,5,6,7}
0
So how to initialize vector correctly?
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:)