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.

Type-Cast von String zu Float?

Empfohlene Antworten

Servus,

sitze gerade bei einem kleinen Problem. Aus einer Datei lese ich über getline() Zeilen in einen String ein. Die Zeile ist ein Float-Wert, also möchte ich einen Typ-Cast durchführen. Leider funktioniert float Wert = float(string) nicht. Gibt es da eine Funktion zur Konvertierung von String nach Float?

Danke für eure Hilfe.

cu, Stony

Da gibt´s eine Extra-Funktion für:

atof, atoi, _atoi64, atol

Convert strings to double (atof), integer (atoi, _atoi64), or long (atol).

double atof( const char *string );

int atoi( const char *string );

__int64 _atoi64( const char *string );

long atol( const char *string );

Routine Required Header Compatibility

atof <math.h> and <stdlib.h> ANSI, Win 95, Win NT

atoi <stdlib.h> ANSI, Win 95, Win NT

_atoi64 <stdlib.h> Win 95, Win NT

atol <stdlib.h> ANSI, Win 95, Win NT

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.