hey all,
how do one convert an integer that a user has entered into a location is an existing 2-d array?
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
main(){
int y;
int grid[4][4]={{1,5,9,13},{2,6,10,14},{3,7,11,15},{4,8,12,16}};
cin>>y;
int u;
int U;
y=grid[u][U];
if (y==grid[3][3]){
cout<<"good";
}
else{
cout<<"bad";
}
}
When I run this, I get a windows error, even tho I get no compiler errors.
thanks
777