Range based for loop?

i was trying the graph code as discussed in class

https://ide.codingblocks.com/#/s/17758

on the ide it says runtime error while on code blocks it says “range based for loop not allowed”
any other way to write this loop? line no. is 23

satyam range based loop is a feature of c++11 and i think u are using c++98 in code block just go to in compiler setting abd change to c++11 the loop will work