-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for compilation of source code #106
Comments
Hey! Hightail parses the sample input and output and then directly runs the code and takes input from stdin and outputs to stdout and also checks the output of your program to the correct output. By parsing, hightail saves you your time of copy pasting the sample input and output and checking the program's output to the correct output. Thus using '#ifndef ONLINE_JUDGE' etc would be unnecessary. I don't think it is necessary for Hightail to run the program with the -DONLINE_JUDGE as the real motive of using Hightail is lost. |
@deepamsarmah I agree with you. But still, it would be nice to have that additional functionality. That may come handy while debugging, when we may need to print lots of lines, like 2D arrays, sets, maps etc, I am not sure they would all fit on Hightail display. Afterall hightail purpose wasn't to aid as a debugging tool. It's a good testing tool, and it allows us to add extra test cases too. So, by having Hightail compile the code with -DONLINE_JUDGE, we can do both. Whenever we need to get our hands dirty with debugging, we can switch to the input/output in IDE, but before submitting the code, we can use Hightail to test the code. |
Since Codeforces and other online judges compile with -DONLINE_JUDGE option in C++, I frequently use the following construct in my code. But, this causes a problem when using Hightail, as it expects output from stdout, not output.txt file.
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
So, if Hightail could recompile the code with -DONLINE_JUDGE option, it would solve this issue.
The text was updated successfully, but these errors were encountered: