Frage zu Schleife in c
-
Hallo liebe Community,
dies ist mein erster Beitrag in einem c Forum, bitte um Gnade
Versuche grad eine Schleife zu basteln, keine Fehlermeldung, bloß ein .exe funktioniert nicht mehr...
Windows xD.
Was mache ich falsch?
#include <stdio.h> #include <stdlib.h> int main() { int i; FILE *a; FILE *b; b = fopen("c.txt", "r"); fscanf(b, "%d",&i); fclose(b); i++; b = fopen("c.txt", "w"); fprintf(a, "%d",i); fclose(b); a = fopen("hallo.txt", "a"); fprintf(a, "1"); close(a); return 0; }
LG SyntaxNull
-
Hi,
Zeile 19 verwendet a statt b.
-
Boolshit schrieb:
Hi,
Zeile 19 verwendet a statt b.
.... Danke
Wie peinlich es klappt