one method to traverse the vector is not working on codeblock ide but work well in codingblocks ide…what is a reason behind this ?
// this one
vector x{1,2,3,4,5};
for(int i:x)
{
cout<<i<<",";
}
one method to traverse the vector is not working on codeblock ide but work well in codingblocks ide…what is a reason behind this ?
// this one
vector x{1,2,3,4,5};
for(int i:x)
{
cout<<i<<",";
}
@aattuull You must change the compiler setting then. By default codeblocks uses c++11 version. Which doesn’t support this type of iteration.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.