.txt into 2D Array

I am working on an assignment that is a text based game. It is a simple game that allows you to control a space ship and avoid asteroids. I am stuck on one part imparticular:

1.) Define two constants to represent the size in rows and columns of the player ship “image”. Create a two-dimensional array of chars to store the player ship “image”.

2.) Implement a function, called loadPlayer, that takes no parameters. This function should load the contents of the “player.txt” file into the player ship “image” array. Hint: Since the files include significant spaces, the stream extraction operator (>>) cannot be used. The getline function reads an entire line of text, including spaces.


The "player.txt file looks like this:

1
2
3
4
5
      /
>=====|
 I*--o>
>=====|
      \


I have no idea how to read the characters into the array, someone please help.
Topic archived. No new replies allowed.