Haoxiang Luo:
 |
 |
 |Hi,  I am trying to write a module myself which should write some data
 |to a file on the hard disk.   I
 |added these test lines in the doLeaf() function,
 |
 |  FILE *fp = fopen("out", "w");
 |  fprintf(fp, "hi, I can print to a file!!!\n");
 |
 |however, it seems only an empty file called "out" was created.  What's
 |wrong?

Just guessing.  Add:

    fclose(fp);

Could be the process buffers aren't being flushed before your module's
parent executable is killed.

Randy

-- 
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA N127-01; RTP, NC 27711

Reply via email to