Load data from a file or as user input?

I have an assignment (C++) that contains a Class that makes some arithmetic operations on two variables

and it is required to give the user the choice whether to load data from file or to give it as input and whether the output on console or on file

I have write the class and some objects in main and it is worked fine but I do not understand what is required and how to implement the above problem?

I know fstream, ifstream, ...,etc
but I don not know how to use them in this problem which is not crearly for me till now

Last edited on
Hello OmarGera,

It looks to me like the beginning of main you will have to make a decision on where the input comes from and where the output goes.

Post what you have done so far. It will make it easier to see what is needed and/or missing.

Andy
Topic archived. No new replies allowed.