Hi, all,
I have a question: anyone knows a way to make fprintf work in CCS simulator?
I wrote a short C program to read 3 lines of integer data (in input.txt) into an array of size 3, and then write them from the array to a file (output.txt). I use fscanf to read and fprintf to write respectively. I ran the program successfully in the unix environment and confirmed that the 3 data have been written to the output.txt file correctly.
However, when I ran the same program in CCS simulator, I confirmed that the 3 data have been read to the array defined in the program successfully, but the data were not written from the array to output.txt successfully. The size of output.txt is always 0, after running the program. In other words, fscanf works but fprintf does not work in CCS simulator.
Anyone can guide me what's wrong with the use of fprintf in CCS simulator? Did I miss anything?
Many thanks.