Its not so much help that I need I just dont understand what my teachers asking. Anyone know?

Write overloaded min functions. One function will return the min of two integers, the second function will return the min of 3 integer values.

Hint: see if you can use the two argument min function for the three argument min function

Note: This means you need two functions called min

Recommended Answers

All 3 Replies

He is asking you to write two functions named min -- The parameters to one of the functions will be two integers, while the parameters to the other function will have three parameters.

That is called function overloading -- more than one function with the same function name but different parameters.

Whats the function supposed to do though?

evaluate the parameters and return the one that has the smallest value. For example, if the two parameters are 1 and 2, the return value will be 1.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.