Hello.
Now i have a task of reading information from a file, i can do this and it works. i've done some of the assignment. My problem is starting to use array of structs more, well at least two at the same time and use this in a proper way.

Right, Task 2 is to Read in the file with data, find a specific round, football/soccer, where there scored most goals, and print that round. there's 33 rounds. i've got it to print each round and amount of goals. like Round 1, 17 goals are scored, but that's succeeded through lots of if statements, which isn't intended.

I'll post some of my code, without the if statements ofc.

Code:
/*start of files with structs*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STRING_LENGTH 100
#define ROUND_LENGTH 6

typedef struct {
int round_match, day, month, year, hour, min, goal_side1, goal_side2;
char team1[STRING_LENGTH];
char team2[STRING_LENGTH];
char supporters[STRING_LENGTH];
} matches;

typedef struct{
int round_round, goal1, goal2, day1, month1, year1, hour1, min1;
char team3[STRING_LENGTH];
char team4[STRING_LENGTH];
char supporters1[STRING_LENGTH];
}    round;

typedef struct{
char hometeam[STRING_LENGTH];
char awayteam[STRING_LENGTH];
} teams;
  
void goalroundplus();

/* main function in here which calls the other function*/

/* functions below */
void goalroundplus(){
FILE *fp;
int x = 0;
int i = 1;
int goalsround[33];/* = "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";*/
int c = 1;
int goals = 0;

matches *info = calloc(199, sizeof(*info));
/*round *roundarray = calloc(33, sizeof(*roundarray));*/


fp = fopen("scorefile.txt", "r");

while(fscanf(
fp,
"%d %d.%d.%d kl. %d.%d %s - %s %d - %d %s",
&info[x].round_match,
&info[x].day,
&info[x].month,
&info[x].year,
&info[x].hour,
&info[x].min,
info[x].team1,
info[x].team2,
&info[x].goal_side1,
&info[x].goal_side2,
info[x].supporters
) != EOF){


}

fclose(fp);

}
It's just after i call my function in the while loop, where i'm supposed to have put information into a new array of structs i think, then compare it somehow, and print the round with most goals. I've tried but have been unsuccesfull, and my mind is really blowing up.
inside the while loop, i have the if statements.

I really hope anyone can help on how i could used array of structs together.
Please ask if there's anything.

Thank you.
Net

P.s det file is a scorefile.txt with input like this:
round date time t1 t2 score supporters
1 16.07.2011 kl. 17.00 OB - FCN 2 - 0 6.965
1 17.07.2011 kl. 14.00 FCM - SIF 1 - 2 5.370
1 17.07.2011 kl. 16.00 ACH - HBK 3 - 0 2.227
1 17.07.2011 kl. 16.00 SDR - FCK 0 - 2 4.992
1 17.07.2011 kl. 18.00 BIF - AAB 2 - 2 11.868
1 18.07.2011 kl. 19.00 AGF - LBK 2 - 1 12.229
2 23.07.2011 kl. 17.00 SIF - BIF 0 - 1 4.173
2 23.07.2011 kl. 19.00 FCK - OB 2 - 2 14.774
2 24.07.2011 kl. 14.00 FCN - ACH 1 - 1 2.662
2 24.07.2011 kl. 16.00 LBK - SDR 0 - 1 1.207
2 24.07.2011 kl. 16.00 AAB - AGF 2 - 1 9.737
2 25.07.2011 kl. 19.00 HBK - FCM 2 - 3 2.371

t1 = team 1
t2 = team 2