LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reg:FILE OPERATIONS (https://www.linuxquestions.org/questions/linux-newbie-8/reg-file-operations-887757/)

shankar.489 06-22-2011 10:58 AM

Reg:FILE OPERATIONS
 
hi,
iam newbie to linux i have met with an problem in priting TRACE MESSAGES to my project.

i have done coding as below
debug_init()
{
fp=fopen("debugfile");
}
dprint()
{
fprinf(fp);
}
but problem here without closing the "debugfile" iam not able to find any data(printed previously) in that file, how can i overcome this problem?

if any suggestions please let me know..!

thx in ADV..!

regards,
shankar.:tisk:

chrism01 06-22-2011 06:44 PM

Assuming C, try http://www.codecogs.com/reference/c/stdio.h/fflush.php


All times are GMT -5. The time now is 12:31 PM.