[sword-devel] Introducing BibleMemorizer

Jeremy Erickson jerickson314 at users.sourceforge.net
Fri Apr 1 16:10:44 MST 2005


> 	Books can be obtained from VerseKey with something like:
>
> 	for (VerseKey vk = TOP; !vk.Error(); vk.Book(vk.Book()+1)) {
> 		cout << vk.getBookName() << endl;
> 	}
>
>
> vk.getBookAbbrev(); is also available if you'd like a shorter book name.
>
> 	-Troy.

When I try to use something like this I get an error from GCC:

error: conversion from `sword::SW_POSITION' to non-scalar type 
`sword::VerseKey' requested

The line that is causing the problem is the for loop:

    for (VerseKey vk = TOP; !vk.Error(); vk.Book(vk.Book()+1)) {

Looks like probably the "VerseKey vk = TOP" part is causing the error.  Do you 
know how to fix this?  Thanks.

The full for loop is:
    for (VerseKey vk = TOP; !vk.Error(); vk.Book(vk.Book()+1)) {
        mBookComboBox->insertItem(vk.getBookName());
    }

-Jeremy Erickson


More information about the sword-devel mailing list