Yes, the easiest way to do it my opinion would be to use freopen to basically change the file opened behind the stdout file descriptor.
You could redirect the console output to a file using
freopen("C:\some_file.txt", "w", stdout);
If you don't want to store the output at once, you should be able to write a /dev/null like (/dev/null is in Unix), but in windows (that I don't have you can try "nul" or "\Device\Null"
So something like the following should work :
freopen("\Device\Null", "w", stdout);
Sorry I can't actually try that out since I don't have windows, but that's the main idea.