Last active
August 29, 2015 14:11
-
-
Save HaiyangXu/abced50b43806b393947 to your computer and use it in GitHub Desktop.
Redirect Standard Input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
inline void redirect(void) | |
{ | |
#ifdef DEBUG | |
freopen("input.txt","r",stdin); | |
freopen("output.txt","w",stdout); | |
#endif | |
} | |
int main(int argc, char* argv[]) | |
{ | |
redirect(); | |
//code here | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment