Console output, mixed language

Console output, mixed language

eriktraneus的头像

Hi,
I am writing a FORTRAN console application with some C++ code. I want to direct the output from FORTRAN (write (6,*) 'blabla') and from C++ to either the console or to a log-file. I want to be able to change the desitnation from inside the program. The fortran output can easily be re-directed by just opening/closing a unit=6 file but the C++ output still goes to the console... How can I direct both streams to the same log file ?

1 条帖子 / 0 new
如需更全面地了解编译器优化,请参阅优化注意事项.