This macro:
#ifndef ONLINE_JUDGE
freopen(“a.txt”, “r” , stdin);
freopen(“a.out”, “w”, stdout);
#endif
is not working in this code: http://ideone.com/GXsXv4
Please tell me why and how will it work now?
I am working on Ubuntu 12.04 platform, will this macro only work for online compilers?
How to put more than one tag?
Okay i am sorry that was my mistake…!!
Check this code this will work: http://ideone.com/Nbqwql
Use a.in and not a.txt
#ifndef ONLINE_JUDGE
freopen("a.in", "r" , stdin);
freopen("a.out", "w", stdout);
#endif
When I compile it on Ubuntu 12.04 platform, it is not taking inputs?
it works on codeblocks in windows…!! dont know why is this not working in ubuntu!!