I am working on a problem for a class I'm taking in which we need to read in text from a file to a 2d table of strings (called 'string table[][]'). The text file I'm reading in is formatted as follows:
Ain el Beida # - # - # OEB # Algeria # Africa # F # 42578 # 61997 # 90560 # #
Segbana # - # - # ALI # Benin # Africa # F # -1 # 10219 # -1 # #
Skelmersdale # - # - # LAN # England # Europe # F # 42611 # 42104 # 39279 # #
#
As you can see, each field is separated by a '#', the end of a line is denoted by 2 #'s, and the end of the file with 3 #'s. I've been looking at a few different ways of isolating each field so that I can save it to the array, but so far have not found anything that works well for my purpose.
I've been banging my head against this for a few hours now and I would really appreciate any advice on how to go about getting this to work.