Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- FILE *mainfile;
- mainfile = fopen("texto.txt", "r+");
- if (mainfile == NULL) { printf("ERROR"); }
- else { printf("OK"); }
- unsigned char string[100][10001]; // [cada quebra de linha][letras]
- int qnt; // quantidade de quebra de linha
- int f, f2; // usos variados (for)
- for (qnt = 0; qnt < 100; qnt++) {
- printf("\nPonto."); // O erro na execução ocorre após "Ponto."
- fgets(mainfile, 9999, string[qnt]);
- /*
- O compilador compila, mas também apresenta esses dois erros:
- [Warning] passing arg 1 of `fgets' from incompatible pointer type
- [Warning] passing arg 3 of `fgets' from incompatible pointer type
- */
- for (f = 0; f < 9999; f++) {
- printf("\n> %d", f);
- if (string[qnt][f] == 255) { goto goto_EOF; }
- if (string[qnt][f] == '\0') { break; }
- }
- }
- goto_EOF:
- (...) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement