📅  最后修改于: 2022-03-11 14:44:53.749000             🧑  作者: Mango
/*sizeof(array_scores) is a pointer to array_scores[],
and has to be divided by each first-object[0]*/
for(int a = 0; a < sizeof(array_scores)/sizeof(array_scores[0]); a = a + 1 ){
cout << "for loop, a = " << array_scores[a] << " at position " << a << "\n";
}
//https://stackoverflow.com/questions/20234898/correct-way-of-looping-through-c-arrays