Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2006, 13:28
Zest
 
Posts: n/a
Dear condzero,
Hi,
Thanks for your help and reply.
But there is still a problem for me that I couldn't manage it.
Would you please let me know how to OPEN A FILE FOR LOGGING OUTPUT IN ANALYZE MODE?
Which function(s) do you use to OPEN A FILE FOR LOGGING OUTPUT IN ANALYZE MODE?
That would be great if you can discuss the case a bit.
I look forward to hearing from you.

Also thank anybody else who has spend time to answer to this topic to bring some help to the point.

Regards,
Zest.
Reply With Quote
  #2  
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
Reply

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 01:46.


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