#pragma once #include #include class CheckDataType { public: static bool CheckToInt(const std::string& input){ try { int ret = stoi(input); return true; } catch (const std::invalid_argument& e) { printf("input is not number...\n"); return false; } catch (const std::out_of_range& e) { printf("input number is out of int range...\n"); return false; } } };