I tried running a program that made an array, but when I tried to run the array, it returned the error stated in the title.
This was my code
#include <iostream>
using namespace std;
int main(){
int len;
cout<<"How long is your array? ";
cin>>len;
int arr[len]={};
for (int i; i<=len; i++){
cout<<i;
arr[i-1]=0;
}
return(arr); //error happened here.
}