I have a character array that can hold 1000 elements (+1 for the '\0'). The array will be filled by user input. I was wondering if there is any way of checking if the input is more than what the array can hold. If I do try to add it, the program will crash before I can compare its size. I was thinking expand the array and see if the input is less than 1000 characters, but that idea doesn't seem like a really good one too me.
EDIT:
im using std::cin.getline() to get input from the user
and can't use the Sting class