Thursday, July 9, 2009

Basic C language: help with XML file output?

I have written my program successfully thus far, but can't find any help on coding for this last part. According to the assignment, I must "Output to stdout the number of records output to the XML file."





(# of records is the result of the program execution)





Any serious help is appreciated! Thanks.

Basic C language: help with XML file output?
Without more details, all I can say is that you need to count the number of records you output in your XML file. Unless global variables are a no-no in your assignment, just initialize a global counter to zero, increment it every time you output a record and at the end of your record outputs, output the counter:





int g_nRecordCount = 0;





// Every time you add a record to XML in your code, increment counter


g_nRecordCount++;





// After completion of XML record output, output the record count


printf("%d XML records output.\n", g_nRecordCount);


No comments:

Post a Comment