• Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    You can redirect stdout and stderr to a file, but I can't remember what's the function that does this. I'll try to find it later.

    Edit: Try this.
    Code:
    FILE *fp = freopen("file.txt","w",stdout);
    // main loop
    fclose(fp);

    I'm not a 100% sure if you need to fclose it manually. In theory the C library should do it for you, but I've seen this in a lot of examples.

    [ Edited by BSzili 26.03.2019 - 16:37 ]
    This is just like television, only you can see much further.
  • »26.03.19 - 16:31
    Profile Visit Website