Input

Suppose the following:

data.txt:
Ain el Beida # - # OEB # Algeria # Africa # F # 42578 # 61997 # 90560 # #
Ain Oussera # - # EDJ # Algeria # Africa # F # 17173 # 44270 # 82435 # #
Ain Temouchent # - # ATE # Algeria # Africa # F # 38298 # 47479 # 54832 # #
Annaba # - # ANN # Algeria # Africa # F # 255938 # 305526 # 348554 # #
Arzew # - # WAH # Algeria # Africa # F # 20970 # 40473 # 53327 # #
#


function prototype:
bool readMultiWord(string &, ifstream &, const string &);

// 'readMultiWord' reads a multiword string
// terminated by a const string reference ("#") from an ifstream reference // object
// into a string reference;
// returns true if a multiword string read;
// returns false if the first word is a separator ("#")
// Example: if 'infile' contains "Los Angeles # California"
// then "Los Angeles" is stored in 's' and
// position of 'infile' is now at "California"

Any ideas on how to incorporate this most efficiently?
bump... anyone?
Topic archived. No new replies allowed.