|

楼主 |
发表于 2022-12-9 17:08:30
|
显示全部楼层
在Debian Linux下,进行了测试:
int i, a[] = {1,2,3,4,5,6,7,8,9};
for(i = 0; i < 9; i++)
cout << i[a];
这样也是可以的。C++的版本:
user@debian:~# g++ --version
g++ (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|