Ok guys this is the last thread I will post about this topic for a while. Main reason my program is due at 2:30 this afternoon. So i need some help guys. Ok heres what iv got so far;
Code:
for (x1=0; x1<20; x1++)
{
for (y1=0; y1<20; y++)
{
InFile >> maze[x1][y1];
open = 'o';
mouse = 'm';
}
}
nextsquare!=99;
do
{
if (mouse+1 == open)
{
mouse++;
nextsquare = mouse;
cout << "down" << endl;
Outfile << "down" << endl;
}
else
if (mouse-1 == open)
{
mouse--;
nextsquare = mouse;
cout << "up" << endl;
Outfile << "up" << endl;
}
else
if (mouse+1 == open)
{
mouse++;
nextsquare = mouse;
cout << "right" << endl;
Outfile << "right" << endl;
}
else
if (mouse-1 == open)
{
mouse--;
nextsquare = mouse;
cout << "left" << endl;
Outfile << "left" << endl;
}
}while (nextsquare == true);
Now im having to use iostream. The program keeps crashing I dont know why. Any help?