CPB Mailing List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: The damnedest problem?!?!?



>         Well if you look at the AnsiString reference there is an 
>         operator that
> will allow the conversion of an int to a AnsiString so that is why
> it will compile and as for calling repaint, you are correct it
> should repaint when it is updated but it is not doing so...

I thought I would throw in my two cents worth.  

>         edtLineCurrent->Text = i+1;

Although the AnsiString does have an overloaded = operator that will 
convert an int to a string, in this case it does not apply.  The 
right hand side of the assignment needs to be resolved first.  This 
means that the int must support adding an int and a String (not 
possible) or the AnsiString must have an overloaded + operator that 
allows adding an int to a String.  AnsiString only overloads the + 
operator to support an AnsiString + AnsiString syntax or a char* + 
AnsiString syntax.  I'm with Lanny on this one.

Michael Trier
Developer's Corner Journal
http://www.pobox.com/~dcj/journal
mailto:mtrier@pobox.com
-----------------------------
Thought for the day:
    Biology grows on you.



W Komornicki's Home Page | Main Index | Thread Index