ok...first step done :-D
i've managed to save the data into the .txt file:
Code:
void guardarConsultas(pnoCons p)
{
FILE *f;
f = fopen("consultas.txt", "w");
while(p != NULL)
{
fprintf(f, "%d\n%d\n%d\n%d\n%d\n%d\n%s%d\n%d %d %d\n%d %d %d\n",
p->idPaciente, p->faixaEtaria, p->tipoConsulta, p->horaConsulta,
p->especialidade, p->duracao, p->desc, p->idMedico,
p->horaMarcacao.hora, p->horaMarcacao.min, p->horaMarcacao.seg,
p->dataConsul.dia, p->dataConsul.mes, p->dataConsul.ano);
p = p->prox;
}
fclose(f);
}
consultas.txt
123456
1
2
2
5
40
desc
123456
2 37 31
17 4 2008
but know the tricky part...load the data :-(
how do i do that know?