#include<iostream>
#include<vector>
using namespace std;
int main()
{
int len;
cin>>len;
vector<int> arr(len);
for(int i=0 ; i< len ; i++ )
arr[i]=i;
for(i=0 ; i< len ; i++ )
cout<<arr[i]<<" ";
return 0;
}
提示
D:\c++\555555\zhizhen-9.cpp||In function 'int main()':|
D:\c++\555555\zhizhen-9.cpp|16|error: name lookup of 'i' changed for ISO 'for' scoping|
D:\c++\555555\zhizhen-9.cpp|16|note: (if you use '-fpermissive' G++ will accept your code)|
蓝山帝景
长风秋雁
相关分类