Roni
asked on
How do functions evaluate arguments?
I just want to know if I am on the right path. The function will evaluate an argument like an error check? Say for instance, if you are suppose to have numeric - it will evaluate the input whether it is numeric or alpha? I am very confused with this. I am just a beginner in C++, taking a class thorugh work and they did not have such good explainations on this subject enough for me to understand it.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
>>so you are saying it does work like an error handler?
At compile time, yes.
But that's if you don't use explicit casting, as in jkr's example.
In general, you should avoid casting, because you're removing the compiler's ability to catch errors at compile time.
At compile time, yes.
But that's if you don't use explicit casting, as in jkr's example.
In general, you should avoid casting, because you're removing the compiler's ability to catch errors at compile time.
ASKER
Thank you very much. In reading your explainations and researching more, I now understand......thank you both again....
ASKER
Okay....how do I change it?
ASKER
Thank you.....
ASKER