There is also a "for-each loop" (also known as ranged-based for loop), which is used to loop through elements in an array (or other data structures):Syntax for (type variableName : arrayName) { // code block to
intnum[3] = {1,2,3};// copy elements of num to varfor(intvar : num) {// code} However, it's better to write theranged based for looplike this: // access memory location of elements of numfor(int&var : num) {// code} ...
letrange-initbe equivalent to thebraced-init-list. In each case, a range-based for statement is equivalent to { auto && __range = range-init; for ( auto __begin = begin-expr, __end = end-expr; __begin != __end; ++__begin ) { for-range-declaration = *__begin; statement } ...
>78% of fire autoattacking isn't really all that impressive when fire also has three additional damage skills (and elementalist design, including staff, is generally based on spending as little time autoattacking as possible), and potentially adds burning as well while air is straight power dama...