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.

Eingabe zerschneiden

Empfohlene Antworten

ich hab folgendes Prob:

ich lese mit getchar() immer ein Zeichen ein.

Mache eine Dezimalzahl draus

eingabe=(eingabe*10) +(zeichen-48)

Dann wird das mit return zurückgeben.

Wenn nun aber folgendes der Fall ist:

Eingabe ist in einer Zeile z. B. 258+789

also dezimal zahl machen und zurück geben, dann das pluszeichen zurückgeben und dann wieder die nächste zahl machen und zurück geben.

Hat jemand ne Idee wie das zu lösen ist?

Dies hier sucht vom Anfang der Zeile bis zu einem '+'-Zeichen

und dann nach dem '+'-Zeichen bis zum ende...

bei mir jedenfalls... :D


pointerChar = strrchr(zeile.c_str(),'+');

pointerInt  = ("%d",pointerChar-zeile.c_str());

ersteZahl   = zeile.SubString(1,pointerInt));

zweiteZahl  = zeile.SubString(pointerInt+1,zeile.Length()-pointerInt);

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.