[sword-devel] Introducing BibleMemorizer

Troy A. Griffitts scribe at crosswire.org
Fri Apr 1 18:23:36 MST 2005


Jeremy,
	That's odd.  I think since you are declaring and assigning the 
variable, it is trying to call a copy c-tor.  Try changing it to:

VerseKey vk;
for (vk = TOP;...

and see if that fixes it.  If so, we might need to rethink the operator 
=(SW_POSITION) feature-- maybe add a VerseKey(SW_POSITION) c-tor or 
something to fix this.

My other thought was to be sure you have #include <versekey.h> and not 
just a class VerseKey; prototype, but that's probably not the problem.


	-Troy.




Jeremy Erickson wrote:
>>	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
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page



More information about the sword-devel mailing list