The arena array is filled by getline( file, input, '\n' ), then seperated in to single chars.
The problem here is that, the above loop is infinite. The loop should finally find a 'free space' to spawn. I've even set it up so that there is only a border around the console screen, for the robot to spawn in. I belive it's the check that is causing the problem: if( arena[ spawnX ][ spawnY ] == ' ' )
But... I really can't see why it's causing a problem, as I use a similar check to get the arena file in to the array:
Have you confirmed that there are actually spaces in the matrix? There may be a bug in the way you fill the matrix, or read the data.
This is a poor method to pick an element with a give value, anyway. It's better to make a list of all the elements that match the constraint and pick one at random from there. This way you're guaranteed to find something at the first try (as long as the list is not empty).
There's probably something screwing up with your I/O. std::fstream opens by default for both input and output, so even if the file doesn't exist, it won't fail to open unless it can't create a new file. Change fArena to std::ifstream. Also check what your working directory is set to. If you're running from an IDE's debugger, it will probably be set to something totally useless. Alternatively, you could use an absolute path to the file.
When I say list, I mean it in the ordinary sense of the word (an enumeration of items). An actual linked list wouldn't be suitable for this because they don't have random access.