I have a question as to what the better programming practice would be if I have a function that takes an integer input to determine the size of an array.
1. Use an unsigned int. This seems like the logical answer at first except that if a user were to enter a negative number to be passed to the function this would result in the creation of a verry large array.
2. Or, use a signed int and check for a negative value before creating the array.
This also raises the question: If a negative input is recieved should I Throw an error and terminate the program, or simply change the value to a positive value...?
3. Any other suggestions/ideas