I would like to open a file before I enter a function and be able to write to it while I'm in the function. I'm not having any luck. Shared? Global? Pass a pointer to the funcion? auto fout = File("myfile.csv", "w"); is what I'm currently using. Thanks for any assistance.