(3)Write the code to define a function named OpenInputFile to open a file for input. The return type of the function should be bool, and the function should return true if the file was open properly and it should return false if the file was not opened properly. It should take as its only argument an input stream variable. Should it be pass by value or pass by reference? Where should the name of the file be obtained? The code you write will answer these questions.
What I am having trouble with is how do I implement the function OpenInputFile into the main program so that I get the correct results? Can someone please fix my program up a little so that it runs the way it's suppose to or give me some assistance on what it is that I'm missing? I know that I'm not too far off.