基于范围的for循环int main(){int array[3]={1,2,3};for(int &e:array)//可以依次将数组中的值提出赋到e上{e+=2;cout<<e<<endl;}return 0;}上述for循环相当于for(int i=0;i<3,i++)