why does the output file look completely different than the input file... what am i doing wrong here?
#include <iostream>
#include <cstdlib>
#include <fstream>
using namespace std;
int main () {
char maze[10, 10];
int x, y;
ifstream file;
ofstream output;
file.open ("maze.txt");
for (y = 0; y < 10; y++){
for (x = 0; x < 10; x++){
file >> maze[x,y];
cout << maze[x,y];
}
cout << endl;
}
file.close ();
cout << endl;
output.open ("pathtaken.txt");
for (y = 0; y < 10; y++){
for (x = 0; x < 10; x++){
output << maze[x,y];
cout << maze[x,y];
}
cout << endl;
}
output.close ();
cin >> x;
return 0;
}