c++ array for loop