Kann mir jemand bitte sagen, was hier das Problem ist:
Wenn ich das Programm starte, dann stürtzt es gleich ab.
Passwords.txt und Users.txt existieren und sind gefüllt.
Kann mir bitte jemand helfen?
Danke schon im voraus!
Code:
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
char *User[10], *Pass[10];
int x;
FILE *Passwords;
FILE *Users;
Passwords = fopen("Passwords.txt", "r");
Users = fopen("Users.txt", "r");
for (x = 0;!feof(Passwords); x++)
{
fgets(Pass[x], 15, Passwords);
}
for (x = 0;!feof(Users); x++)
{
fgets(User[x], 15, Users);
}
printf("%s %s", User[0], Pass[0]);
fclose(Passwords);
fclose(Users);
}
Passwords.txt und Users.txt existieren und sind gefüllt.
Kann mir bitte jemand helfen?
Danke schon im voraus!