Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 09-09-2006, 01:01
condzero
 
Posts: n/a
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.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 00:32.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )