Strings formatieren richtig



  • Hallo

    Wie formatiere is strings richtig, es gibt zwar einen format befehl aber mit dem komme ich nicht so klar...

    Ich hab AWorkCount und Download.Size_Total
    Es soll so aussehen. Im Label_Progress->Caption soll stehen

    AWorkCount/Download.Size_Total
    xxx.xxx kb/xxx.xxx kb

    Label_Progress->Caption = Format("%0.0/%0.0", AWorkCount/1024,Download.Size_Total/1024)

    fehler [C++ Error] Unit3.cpp(48): E2034 Cannot convert 'int' to 'const TVarRec *'



  • Hast du dir 'Format' von AnsiString mal in der Hilfe angeschaut? Der Blick lohnt sich. 😉
    Ich wuerde mir einfach mal die Methoden IntToStr anschauen. Damit muesste es doch einfach gehen. Ich gehe jetzt mal davon aus, dass deine beiden Variablen vom Typ 'int' sind.
    MfG Aoeke


Anmelden zum Antworten