Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91363aa commit e730240Copy full SHA for e730240
1 file changed
main.cpp
@@ -10,9 +10,8 @@
10
11
using namespace std;
12
void redirectOutput(char const * const filename) {
13
- FILE *output_file;
14
- freopen_s(&output_file, filename, "w", stdout);
15
- freopen_s(&output_file, filename, "w", stderr);
+ freopen(filename, "w", stdout);
+ freopen(filename, "w", stderr);
16
printf("printf works\n");
17
cout << "cout works\n";
18
}
0 commit comments