Lets say I made a square root function and I want an error message if the input is negative. How...
EDIT: This is just an example. I want to make errors for other things as well. I'm asking if there is a specific way to test for errors and then output an error message instead of returning a value.
jsmith, would that still apply if the input was determined at run-time? I am under the impression that using unsigneds would only give compiler errors if a literal (or a value available at compile-time) was used.