strtol will work just fine for this job: char *end; int correctInput = strtol(argv[1], &end, 10); if (*end != '\0') { std::cout << "invalid ...
確定! 回上一頁