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.

string to char

Empfohlene Antworten

Veröffentlicht

Hallo

kann mir vielleicht einer sagen wie ich einen string in einen char umwandeln kann?

char array[255];

array = IDC_INPUT->get_Text();

get_Text() ist hier ein string und der soll in in array reingeschrieben werden!

ich arbeite mit VSC++.Net

Du mußt durch den String Zeichen für Zeichen iterieren und die Werte jeweils in dein Array schreiben.

Ein String ist quasi ein Array of Char. Kannst also auf die einzelne Indizies mit "String" zugreifen. Hättest also dein Char. Wenn du das in ein anderes Array kopieren möchtest kannste das mit folgender Schleife machen.

For (i=0;i<strlänge;i++){

Buchstabe=String;

}

Würde aber IMHO nichts bringen weil du mit der Schleife den ganzen String in einen Array of Char kopierst, was der String ja eigentlich schon ist.

MVG

need-some-blood

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.