0

hi all, i used the search function, but the threads i found didnt really help me much since i am quite a newbie and didnt understand how it worked.

so what i am trying to do seems simple but it doesnt work. i have a textfile with a single line of numbers. my goal is to read the line and put the numbers into a char array.

```
char sudoku[81];
int i = 0;
while((fscanf(file, "%ld", &sudoku[i])) != EOF ){
fscanf(file, "%ld", &sudoku[i]);
i++;
}
```

the amount of numbers is fixed to 81, so the file looks like this:

001000009608794020009105000000670002080000060090430050004000010930010840002043000

so when i try to read from the array i only get:

-1-1-1127000000000000000000000000000000000000000000000000000000000000000000000000000000

i appreciate any help, thanks in advance