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.

Login in C

Empfohlene Antworten

Veröffentlicht

hab ein problem. ich programmiere noch nicht lange und weiß daher ni weiter. und zwar will ich eine art loginfunktion schreiben. das heißt ich habe eine .txt datei wo zeile für zeile, name, vorname und passwort stehen

bsp:

vorname1;name1;passwort

vorname2;name2;passwort

.

.

.

wie bring ich dem jetzt bei, dass er die eingegebenen wörter (per tastatur) mit dem in der .txt vergleicht?

es könnte evtl strcmp weiterhelfen, aber ich weiß nicht wie das dann alles in code aussieht

hoffe mir kann jemand helfen

danke erstmal für deine schnelle antwort.

datei öffnen und auslesen geht. mit dem strtok hab ich so ein problem! ich hab hier so ein kleine bspprogramm, aber ich komme nicht klar wie ich jetzt die datei dort einbinden soll, damit er es vergleicht!

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main(void)

{

char string[] = "Ein Teststring mit mehreren Worten\n"

"und mehreren Zeilen.\t Ende\n";

int i=1;

char *ptr;

ptr = strtok(string, "\n\t ");

while(ptr != NULL)

{

printf("% d. Wort: %s\n",i++,ptr);

ptr = strtok(NULL, "\n\t ");

}

return EXIT_SUCCESS;

}

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.