Thisword is a string&, firstnode a pointer to a struct where word is a member string.
if (thisword < firstnode->word)
{
firstnode = temp;
}
In some circumstances where Thisword is alphabetically before firstnode->word, firstnode = temp does not execute. It seems to happen when Thisword has the same letters as the first letters of firstnode->word: i.e. a after an, or zig after zigzag.
Is this a feature, a bug, or am I missing something obvious?
I have Dev-C++ 4.01 and gcc 2.95.
Thanks
Derek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a fragment from a member function:
Thisword is a string&, firstnode a pointer to a struct where word is a member string.
if (thisword < firstnode->word)
{
firstnode = temp;
}
In some circumstances where Thisword is alphabetically before firstnode->word, firstnode = temp does not execute. It seems to happen when Thisword has the same letters as the first letters of firstnode->word: i.e. a after an, or zig after zigzag.
Is this a feature, a bug, or am I missing something obvious?
I have Dev-C++ 4.01 and gcc 2.95.
Thanks
Derek
Found the problem it was upstream from the comparison; so ignore the message.
Thanks
Derek
Ignore my original post.
Found the problem: it wasn't with the comparison, but further upstream.
Thanks.
Derek
Ignore my original post.
Found the problem: it wasn't with the comparison, but further upstream.
Thanks.
Derek