I need help! I am learning how to write functions but I have no idea how to start this.... could some one help me. I would really appreciate it. Thank You.

I need to implement a number of useful functions using a header file and an implementation file. I also need to place the prototypes for my function in a .h file, and implement these functions in a .cpp file. I also need to write a driver to test my functions before I upload them.

Deliverables:

MyFunctions.h

MyFunctions.cpp

Driver.cpp


Function:

1. maximum
a. Precondition
i. two integer values exist
b. Postcondition
i. The value of the largest integer is returned.
ii. The original integers are unchanged
iii. If the integers have the same value then the value of either integer is returned.
c. Return
i. integer
d. Description
i. Function returns the value of the larger of two integers.
e. Prototype: int maximum ( int, int );

I saw a very similar post with a very similar question here just now. Classmates? :P

Anyway, the rules here is that you need to try out yourself, show us what you have done, what problems you encountered, and then we will help you to solve the problems.

Don't believe in the myth that solutions would magically appear if you post some homework on Daniweb.

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.