Hi Zest,
Not sure what you mean by "Analyze Mode".
In my example, I open a file with the parameter "wt" (Write, text mode).
Then I simply create my output:
Code:
char b[1024];
unsigned int o = 0; //Loop counter
FILE * pFile;
pFile=fopen("myfile.txt","wt"); // open for write text mode
// Use a loop and print your output, or just keep appending data to a buffer
then print the entire buffer (Note: Use of new line char n)
LOOP:
sprintf( b, "Some text\n")
fputs (b,pFile); // or possibly fwrite (b , 1 , 80 , pFile); (where 80 is the
length of your text, not sure which way is more applicable as I generally
use the code below)
...
//or
for ( o = 0; o < strlen(b); o++ )
{
putc(b[o], pFile);
}
// CLOSE THE FILE.
fclose (pFile);
This produces a nice clean text file.
Perhaps others can elaborate more.
cheers.