Skip to content

Instantly share code, notes, and snippets.

@astamatto
Created April 20, 2017 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astamatto/31d8b0bd787bdc8734b9d620df662c65 to your computer and use it in GitHub Desktop.
Save astamatto/31d8b0bd787bdc8734b9d620df662c65 to your computer and use it in GitHub Desktop.
char linha[255];
int matriz[i][j];
for(int i = 0; i < nLinhas; ++i) {
fgets(linha, sizeof(linha), arquivo);
for(int j = 0; j < nColunas; ++j) {
sscanf(linha, " %d", &matriz[i][j]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment