I have a function in which I iterate through strings. It seem fairly ok, but sometimes I run into segmentation fault. Is there a way of iterating in C++ that's safer?..
Code:
for(int i = offset; i < (str.size()/4); i = i+4){
..		// do stuff at every fourth character, index(4*i);
..	..}
Or is there a better way of indexing i?