Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (verifica_ficheiro(f) == 1) {
- return NULL;
- } else {
- while (fscanf(f, "%d %f %d %d %49[^\n]", &aux.id, &aux.preco, &aux.valor, &aux.estado, aux.nome) == 5) {
- (*tam)++;
- temp = realloc(vetor, sizeof (Guitarra)*(*tam));
- vetor = temp;
- *(vetor + (*tam) - 1) = aux;
- }
- }
- fclose(f);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement