I\'m new to code blocks, and I can\'t seem to get it to work with command line arguments of < input > output. Does anyone know how to?
I\'m currently able to read
I tried almost all of the options & failed to make it work :P After becoming fed up with all that, I basically use file processing to get my work done ( phew )
here is what I did in the code
At global scope I wrote :
#define DEBUG
#ifdef DEBUG
#include
ifstream Inputfile;
ofstream Outputfile;
#define cin Inputfile
#define cout Outputfile
#endif //#ifdef DEBUG
& in main I wrote the following before doing anything else:
int main(){
#ifdef DEBUG
Inputfile.open("Input.txt");
Outputfile.open("Output.txt");;
#endif // #ifdef DEBUG
Finally just before closing the main process did this :
#ifdef DEBUG
Inputfile.close();
Outputfile.close();
#endif // #ifdef DEBUG
After this added two files
Input.txt
&
output.txt
to the project
This worked as expected