Hello,
I'm looking for something akin to a fscanf() replacement in Zig. I have the following C code:
// Open the file specified by the i-1th argument
FILE* fp = fopen(argv[i - 1], "r");
// Loop through each row in the file
for (j = 0; j < COLS; j++) {
// Read a value from the file and store it in sold[i-2][j]
fscanf(fp, "%*d %*s %d", &x);
sold[i - 2][j] = x;
}
// Close the file
fclose(fp);
which you can see loops through the rows in a file and pulls out integers in the third column. How can I do a similar thing in Zig?