I am writing a small "tree-like" C ++ program with opencscad . I want to get the program output to a .txt or .scad file, so that I can later compile it into OpenSCAD. Opencscad uses printf () to output the program, so I end up with a console window showing my program and cannot get to it. The program quickly gets too large to just copy from the console window, and Visual Studio will not let me add "> output.txt" to the "run" command. Is there a way to get Visual Studio to output the results to a file or replace each printf () with some command to write to the file?
I can add the program that I use, but the only important bit is that it outputs a lot of text.
source share