Compilation problems

I have an assignment to put three little programs into one, making each one a function of the main program, which is a kind of menu. The three work perfectly as separate entities, but when I put them together, the thing won't compile. Can anyone tell me what's wrong here?

The programs (functions) are:

1. A dice simulator
2. A program for calculating the number of days between two dates, taking leap years into consideration
3. A program for calculating the cost of a telephone call during different times of the day.

Why does your function on 324 return float? You are using doubles in the body of the function and then trying to cram the double (with it's additional precision back into the float). This is a warning from the compiler but it should be addressed.

Change line 30 to srand((unsigned)time(0)); to ensure that the value returned from time() is explicitly cast into an unsigned int instead of a variable of type time_t.

Your problem is that you have no main() in your code. The compiler needs to have an entry point for your program.

What is MainProgram.h? Do this: pair one function with a main program. Get it to compile. Add the second function, get it to compile. Look in your text or on this site to see examples of programs with multiple functions.

All you've done is change two if's to a switch and forgotten to add the actual code to be executed for each. In other words, you took something that worked and made it not work. I'm not trying to be harsh here, but that's what you did.