I am running into some trouble trying to print out this code. I have a function that generates a search space with ranges 1 to 8. But when I try to output it, the program quits on me.
#include <iostream>;
using namespace std;
char yOrN;
int answer;
const int LENGTH=4096;
int guess[LENGTH];
void searchspace(int guesses[],int length){
int count = 0;
for(int i=1; i=8;i++){
for(int j=1; j=8; j++){
for(int k=1;k=8;k++){
for(int l=1;l=8;l++){
guesses[count]=1000*i+100*j+10*k+l;
count++;
}
}
}
}
}
int main(){
searchspace(guess,LENGTH);
for(int i = 0; i<4096;i++){
cout<<guess[i]<<endl;
}
}