Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Ich nutze den Borland C++Builder, welcher mir folgenden Fehler zeigt: Lvalue required!!!

Hier der wichtige Quellcode:

void TFrExportFirma::Zuweisen()

{

wert Zuweisen;

Zuweisen.Nummer = EdNummer->Text;

}

Die Struktur habe ich folgendermassen Implementiert:

struct wert

{

char Nummer[1];

};

Warum kommt dieser Fehler und wie kann ich ihn verbessern???

Danke und Gruß

Hoeen

Ein l-value ist ein Ausdruck, der auf der linken Seite eines Zuweisungsoperators stehen kann.

Einem Array (wie in Deinem Fall) kann kein Wert zugewiesen werden, auch wenn das Array nur ein Element hat.

Wie Du das Problem löst, hängt davon ab, was EdNummer->Text ist. Wenn es ein char ist, dann wird

Zuweisen.Nummer[0] = EdNummer->Text;

funktionieren. Ist es aber auch ein char-Array oder ein char*, dann brauchst Du

Zuweisen.Nummer[0] = EdNummer->Text[0];

Alles natürlich unter der Voraussetzung, dass Du wirklich nur ein Zeichen kopieren willst.

Hät ich mir auch selbst denken können!!! Aber trotzdem danke sehr!!!

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.