Is there any way of doing this?

I need to open up an output text file in the main function (where argv is) and then write to it from within a function called by main, yyparse(void). This function...