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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The argument is evaluated at compile time, and if it does not match the function arugment type, or can not be converted via operators, than you'll get a compile error.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RoniAuthor Commented:
Can you give me an example?  I am still not understanding - so you are saying it does work like an error handler?
Basically, Axter is correct - however, just about the syntax. The is no logical evaluation, so you still could break functionality by passing nonsense values like e.g.

int Add(int a, int b) {

    return a + b;

Add((int) "one", (int) "two");


char arr[255] = "test";

strcat(test,(char*) 42);
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

>>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.
RoniAuthor Commented:
Thank you very much.  In reading your explainations and researching more, I now understand......thank you both again....
RoniAuthor Commented: do I change it?  
RoniAuthor Commented:
Thank you.....
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.