Driver Function?

I have the following program, and need to create driver functions to call the functions in the program. Can anyone help me out?? I'm not even sure what a driver function is.

 
Last edited on
Hi giraffe1234,

They just mean you to write a program that calls the functions in the given code. In other words write a main() function that demonstrates the use of the Rational object and all it's member functions.

Hope this helps :+)
So what I have in main, I just put into another cpp file??
Yes, put it in a main.cpp file & make sure you test all the member operators & functions & constructors.

Cheers
But how will the class and all its member/operators/functions be included in the other program? Sorry for all the questions, I'm just really new to this.
Just include the header file you already have (without the main() function) into the main.cpp file.

Maybe your teacher didn't want you to do this, just leave the main() function where it is, as long as the code tests everything.
Topic archived. No new replies allowed.