1
void Criar_Ficheiro_Pizza()
{
FILE *B;
if ((B = fopen("Pizzas.txt", "a")) == NULL)
printf("\n\t !!! Ficheiro nao pode ser guardado!!!");
else
{
pizzas *aux;
while(aux!=NULL)
{
fprintf(B,"%d\t %c\t %.2f\t\n", aux->codpizza, aux->descricao, aux->preco);
aux=aux->prox;
}
fclose(B);
}
}
how to do that is that I’m still learning programming...
– abdulay fonseca
I updated the answer, adding an explanation about where to get the data. If possible add the full code to facilitate the explanation.
– Marcelo Fonseca