Every time I run my c++ code I need to create input output text files in the same location,
Can we use a single input.txt and output.txt for multiple programs located in different locations .
#ifndef ONLINE_JUDGE
freopen(“input.txt”, “r”, stdin);
freopen(“output.txt”, “w”, stdout);
#endif
I created input output text files in Desktop and gave path of these in freopen but I got error.
I recently started learning c++ so I dont have any idea about syntax and what online judge do .