int main() { SWMgr library; auto const book(library.getModule("KJV")); VerseKey *vk = (VerseKey *) book->getKey(); for (;!vk->popError();vk->setChapter(vk->getChapter()+1)) { vk->setVerse(vk->getVerseMax()); std::string text = book->stripText(); trimString(text); if (!text.empty() && (*text.rbegin()) == ',') { cout << vk->getText() << ":\n\n"; cout << text << endl; } } return 0; }
int main(int argc, char **argv) { SWMgr library; SWModule *book = library.getModule("KJV"); VerseKey *vk = (VerseKey *) book->getKey(); for (;!vk->popError();vk->setChapter(vk->getChapter()+1)) { vk->setVerse(vk->getVerseMax()); SWBuf text = book->stripText(); text = text.trim(); if (text.endsWith(",")) { cout << vk->getText() << ":\n\n"; cout << text << endl; } } return 0; }