ASSCII-Files Problem

I cannot find the mistake.
Pls help me.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<string.h>
#include<Windows.h>

struct Klassen
{
	char klasse[100];
	char kv[100];
	int schueler[100];
	char stammsaal[100];
	char abteilung[100];
};

void main()
{
	FILE* datei;
	char kette[100],klasses[10];
	int i=0,p=0,gesf=0,ges,x[100];
	struct Klassen k[100];
	datei=fopen("C:\\Users\\J├╝rgen\\Desktop\\ASSCII_FILES\\Klassenzahlen.txt","r");

	if(datei==NULL)
	{
		printf("Fehler\n\n");
	}
	else
	
	while(fscanf(datei,"%s %s %s %s %s",&k[i].klasse,&k[i].kv,&k[i].schueler,&k[i].stammsaal,&k[i].abteilung)!=EOF)
	{
		i++;
		gesf++;
	}
	ges=gesf-1;

	printf("Geben Sie die Klasse ein:");scanf("%s",&klasses);

	for(p=0;p>ges;p++)
	{
		x[p]=strcmp(k[p].klasse,klasses);
		if(x==0)
		{
			printf("KV:%s\nSchueler Anzahl:%s\nStammsaal:%s\nAbteilung:%s",k[p].kv,k[i].schueler,k[p].stammsaal,k[p].abteilung);
			Sleep(3000);
			exit(0);
		}
		else;
		continue;
	}
		
	getchar();
	getchar();

}
Iam able to start the programm but it doesn't work.
it doesn't work

Do you honestly think that's a helpful description of your problem?
Topic archived. No new replies allowed.