diff --git a/main.cpp b/main.cpp index fe6fb0d..f233c47 100644 --- a/main.cpp +++ b/main.cpp @@ -39,11 +39,13 @@ input_data() { for (i = 0; i < in.stroke.length(); i++) { if (isspace(in.stroke[i])) { cerr << "invalid input"; + exit(0); } } if (in.stroke[0] == check2[0]) { if (in.stroke.length() != 7) { cerr << "invalid input"; + exit(0); } } return in;