Let me get straight to the point. Here's the code:
The first function reads in the data from a file, and puts it into a structure, row by row. The structure deifinition looks like this:
printf("1) file succefully opened!\n");
And the function that does not work as it is supposed to looks like this:
NOTE: While trying to figure out, what is the problem, I simlified the get_team() function. You are supposed to enter the team name: "Agarak" . The contents of the games.home_team is "Agarak", thus the condition should evaluate to true - at least, in my oppinion... games is an array of structures, and if I print out the contents with a for loop, it seems to contain all the data correctly... I suspect, that there may be some stray \0 or \n characters in the strings, because of scanf() or sscanf() or fgets(), but I couldn't find proper references, which would shed some light on this matter. Any help ideas would be welcome!
printf("Give me a team name:\n");