Since I don't see that you've posted to the C board and you are using pure C syntax within the code I'd encourage you to post there.
I note a problem with the syntax you're using to declare arrays. When declaring arrays the size needs to equate to a const int, not int, which is what noofline is.
Lerner
Nearly a Posting Maven
2,382 posts since Jul 2005
Reputation Points: 739
Solved Threads: 396
if(packe[q].strinput[0] == ' ')
{
q++;
// Because you have incremented q by one,
// the fprintf() call below is guaranteed to produce
// unwanted output ...
}
// You must change your code so that you know whether to use
// packe[q].strinput or packe[q - 1].strinput ...
fprintf(creafile, "%d %s \n", timeslot1[i], packe[q].strinput);
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395