Hi,
Just wanted to know if anybody could help me, ive found a test program to see if
I could read information from a text file, and print the information to the screen, prob is when I run the program, visual studio crashes.
Code:
#include<stdlib.h>
#include<stdio.h>
int main(void)
{
FILE *file_in;
int points;
char team[20];
file_in=fopen("Prem.txt", "r");
while (!feof(file_in))
{
fscanf(file_in, "%s, %d", team, &points);
}
fclose(file_in);
printf("Team: %s", team);
}
I think it may have a problem finding the text file on my computer