Menu

Text File Containing Following Information Map Small Islands Treasure Nw Corner Start Se C Q43791351

I have a text file containing the following information:

# Map

# Small islands with treasure in the NW corner and start in theSE corner.

M

5

o$…

oo…

#..o.

..oo.

….@

I want to read in the file but want to ignore the comments atthe top (they begin with #). There can be infinite amount ofcomments. I want to store the letter (M) in a char variable, andthe number as the map size. The following characters represent atreasure map, and I want to read that into a vector of vectors. Howshould the code look to accomplish this? I am writing the code inC++.

Expert Answer


Answer to I have a text file containing the following information: # Map # Small islands with treasure in the NW corner and start …

OR