Input Validation to make sure only number c++
Ok, I'm trying to get good at using pointers so I'm trying to write a input validation for the user input to make sure that anything that isn't a number is handled correctly. When I use isdigit() isn't working for me. I still get an exception when I enter a alphabet. Any suggestions? Thanks. Check this out: #include<iostream> #include<algorithm> #include<string> #include<cctype> using namespace std; void EnterNumbers(int * , int); int main() { int input = 0; int *myArray; cout << "Please enter the number of test scores\n\n"; cin >> input; //Allocate Array myArray = new int[input]; EnterNumbers