Issue in declaring vector

Please help me in resolving the following issue. I am not able to initialize vector in sublime. Thanks.

hello @siddhu28.ss
ur code is correct.
try to update ur sublime (take help of stackoverflow).

I’m on the latest build, 3.2.2. All other initialization methods work perfectly.

run ur code over some online ide and check whether it is working there or not

@siddhu28.ss
Your initialisation of vector list should work if you are working with new C++ versions,
Following will work in any case::
you should do like this
vector<int> v(5)={1,2,3,4,5};
where you write n=size in v(n) as written v(5) above
If it works hit a like button!
Regards

@rkrishna
his way of intialisation is also correct

same issue with the other implementation.

on online IDE, it is working, but as the course is running on the offline IDE sublime text, can you verify by running this piece of code on your sublime text and share the results, so that this issue can be classified as general sublime text issue or my machine specific issue. Thanks!

hey the issue is related to ur ide only.
once try to update ur gcc compiler or install some other ide.

Not a problem with gcc, something with sublime. The code’s running perfectly on xcode.