Posted by dead_mousE on Thu 24th May 07:19
download | new post
- int exportar_votos(char *ndir)
- {
- char *temp;
- int i;
- FILE *arq;
- temp = malloc(sizeof(char) * (strlen(ndir) +
- strlen(_nome_arq_voto)));
- strcpy(temp, ndir);
- /* subentende-se separador de diretório já incluído */
- strcat(temp, _nome_arq_voto);
- arq = fopen(temp, "wb+");
- /* erro ao abrir arquivo ... */
- if (! arq) return 0;
- for (i = 0; i < n_vot; i++)
- fwrite(&votos[i].num_cand, sizeof(NUM_CAND), 1, arq);
- fclose(arq);
- free(temp);
- return 1;
- }
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.