Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 81e3174

Browse files
specify the std abort function in C++ driver
This fixes a compile error in the C++ driver that occurs if the problem function has any parameter named `exit', like problem #1965.
1 parent fbbdcc3 commit 81e3174

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/com/dogcows/resources/C++Driver‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ bool __equals(const std::vector<double>& actual, const std::vector<double>& expe
138138

139139
int main(int argc, char* argv[])
140140
{
141-
bool __exit_on_fail = false;
141+
bool __abort_on_fail = false;
142142
int __pass = 0;
143143
int __fail = 0;
144144

145-
if (1 < argc) __exit_on_fail = true;
145+
if (1 < argc) __abort_on_fail = true;
146146

147147
std::ifstream __in("testcases.txt");
148148
for(;;)
@@ -175,7 +175,7 @@ int main(int argc, char* argv[])
175175
<< " Actual: " << __actual << std::endl
176176
<< " Expected: " << __expected << std::endl;
177177
++__fail;
178-
if (__exit_on_fail) exit(1);
178+
if (__abort_on_fail) std::abort();
179179
}
180180
}
181181

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /