From 81e31744f42f77c3d8e72242c68dbff70519ca41 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Thu, 24 Jan 2013 22:23:35 -0700 Subject: [PATCH] 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. --- src/com/dogcows/resources/C++Driver | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/dogcows/resources/C++Driver b/src/com/dogcows/resources/C++Driver index 24ab333..8161f63 100644 --- a/src/com/dogcows/resources/C++Driver +++ b/src/com/dogcows/resources/C++Driver @@ -138,11 +138,11 @@ bool __equals(const std::vector& actual, const std::vector& expe int main(int argc, char* argv[]) { - bool __exit_on_fail = false; + bool __abort_on_fail = false; int __pass = 0; int __fail = 0; - if (1 < argc) __exit_on_fail = true; + if (1 < argc) __abort_on_fail = true; std::ifstream __in("testcases.txt"); for(;;) @@ -175,7 +175,7 @@ int main(int argc, char* argv[]) << " Actual: " << __actual << std::endl << " Expected: " << __expected << std::endl; ++__fail; - if (__exit_on_fail) exit(1); + if (__abort_on_fail) std::abort(); } } -- 2.45.2