S
Smegly
Hi,
I'm confused about a situation i have ..
fprintf works in one function, but not in the other . .
This is my part of my code for the two functions ..
void customer(FILE *fin, FILE *fout, int msqid, message_buf sbuf, size_t
buf_length, int timer)
----------------------------------------------------------------------------
-----
//printf("%s\n", buff);
time(&now);
fprintf(fout,"--------------------------------------------------\n");
fprintf(fout,"Customer %s: %s\rArrival time: %s\r", custRef,
custAction, ctime(&now));
//fprintf(fout,"--------------------------------------------------\n");
----------------------------------------------------------------------------
------
this fprintf works. . .
now this is part of the other function teller()
void teller(FILE *fptr1, message_buf rbuf, int msqid, int i, int Td, int Tw)
----------------------------------------------------------------------------
-----
printf("Customer statistics for Teller %d\n", getpid());
printf("Servicing customer %s - Action required %s\n", custNum,
custAct);
fprintf(fout, "Customer statistics for Teller %d\n",getpid());
----------------------------------------------------------------------------
----
this fprintf does not work . .
Does anyone know why this would be the case ?
Matt
I'm confused about a situation i have ..
fprintf works in one function, but not in the other . .
This is my part of my code for the two functions ..
void customer(FILE *fin, FILE *fout, int msqid, message_buf sbuf, size_t
buf_length, int timer)
----------------------------------------------------------------------------
-----
//printf("%s\n", buff);
time(&now);
fprintf(fout,"--------------------------------------------------\n");
fprintf(fout,"Customer %s: %s\rArrival time: %s\r", custRef,
custAction, ctime(&now));
//fprintf(fout,"--------------------------------------------------\n");
----------------------------------------------------------------------------
------
this fprintf works. . .
now this is part of the other function teller()
void teller(FILE *fptr1, message_buf rbuf, int msqid, int i, int Td, int Tw)
----------------------------------------------------------------------------
-----
printf("Customer statistics for Teller %d\n", getpid());
printf("Servicing customer %s - Action required %s\n", custNum,
custAct);
fprintf(fout, "Customer statistics for Teller %d\n",getpid());
----------------------------------------------------------------------------
----
this fprintf does not work . .
Does anyone know why this would be the case ?
Matt