This is the input that I am trying to load up the array with:
11 13
7 10
XXXXXXXXXXXXX
X JX AX X X
XXXX XXXXBX X
X X SX X X
X XXXX XXX X X
X X X X X
X XXXXXXXXX X
X X X X
XXXXXX XXXX X
XL X X
XXXXXXXDXXX X
the numbers at the top are to determine the width and length of the array and the the 7 and the 10 are where the D is located but that does not matter at this point that is for searching later on in the program.
Also for some reason I can't get the white space characters to show up but there should be an even line of X's down the right side.
#include <iostream>
using namespace std;
//int loadMaze(char [][14], int , int);
//int printMaze(char [][20]);
int main()
{
int length = 0;
int width = 0;
int doorx;
int doory;
char maze[width][length];
maze[length][width];
cin>> length;
cin >> width;
cin>> doorx;
cin>> doory;
for(int i = 0; i < length; i++ )
{
for(int j = 0; j < width; j++ )
{
cin >> maze[j][i];
}
}
for ( int i = 0; i < length; i++ )
{
for ( int j = 0; j < width; j++ )
{
cout << maze[j][i];
}
cout <<endl;
}
}