Mail Archives: djgpp/2001/08/27/19:25:38
>> for( ; a < greater, equal == 0 ; a++)
>> {
>> input1.substr(a, b).compare(input2, c, b);
>> }
>This is an infinite loop. equal is always 0. Probably your intention was to
>write something like :
>
>for( ; a < greater && equal == 0 ; a++)
> equal = input1.substr(a, b).compare(input2, c, b);
>
>
I thought that if the two values or characters that the compare() function is
comparing are not equal, it will return a value other than 0, and if they are
it will return 0..? am i mistaken?
------------------------------------------------------------
Get your FREE web-based e-mail and newsgroup access at:
http://MailAndNews.com
Create a new mailbox, or access your existing IMAP4 or
POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------
- Raw text -