Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e730240

Browse files
committed
Revert "Get rid of deprecation warning"
This reverts commit 91363aa. This is a Microsoft-specific warning.
1 parent 91363aa commit e730240

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
using namespace std;
1212
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);
13+
freopen(filename, "w", stdout);
14+
freopen(filename, "w", stderr);
1615
printf("printf works\n");
1716
cout << "cout works\n";
1817
}

0 commit comments

Comments
 (0)