void concordance::printConcordance (ostream & out)
void concordance::printConcordance (ostream & out)
// print concordance on the given output stream
{string lastword = "";wordDictType::iterator pairPtr;wordDictType::iterator stop = wordMap.end();for (pairPtr = wordMap.begin(); pairPtr != stop; ++pairPtr) { out << (*pairPtr).first << " "; lineList & lines = (*pairPtr).second; lineList::iterator wstart = lines.begin(); lineList::iterator wstop = lines.end(); for ( ; wstart != wstop; ++wstart) out << *wstart << " "; cout << endl;}