From 98b94a2df3a7845964772ee15d556c999521aab4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Aug 2020 01:50:31 +0530 Subject: [PATCH] exit -> std::exit --- machine_learning/neural_network.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/machine_learning/neural_network.cpp b/machine_learning/neural_network.cpp index fc10d2e10..01c4f3891 100644 --- a/machine_learning/neural_network.cpp +++ b/machine_learning/neural_network.cpp @@ -393,7 +393,7 @@ namespace machine_learning { // If there is any problem in opening file if(!in_file.is_open()) { std::cerr << "ERROR: Unable to open file: "<< file_name << std::endl; - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } std::vector >> X, Y; // To store X and Y std::string line; // To store each line @@ -653,7 +653,7 @@ namespace machine_learning { // If there is any problem in opening file if(!out_file.is_open()) { std::cerr << "ERROR: Unable to open file: "<< file_name << std::endl; - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } /** Format in which model is saved: @@ -724,7 +724,7 @@ namespace machine_learning { // If there is any problem in opening file if(!in_file.is_open()) { std::cerr << "ERROR: Unable to open file: "<< file_name << std::endl; - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } std::vector > config; // To store config std::vector >> kernals; // To store pretrained kernals