我有下面的代码
int array[3] = { 10, 15, 20};
如何以相反的顺序访问其元素,而不反转索引。我的意思是索引0将返回最后一个元素(20),索引2将返回第一个元素(10)。
0
2
array[0] // it would return 20
提前致谢
c++ arrays
arrays ×1
c++ ×1