So for a project I am needed to use a void function for when the file is asked for the user inputs the file name and the void function then checks to see if the file is actually there or not. If it is then it moves on, if not it is to display the error message below. I am not asking for code, but perhaps more clarification on my errors that I am getting. I do leave out or mess up in simple ways and may be overlooking something.
So my code works fine without this function, but after I put it under the main function it gives me errors like "expected initializer before 'string'" and a couple of expected constructor, deconstructor, or type conversion and expected unqualified id before the if and else lines.
The prototype declaration about the int main is void inputErr() because there is no value being given. If the rest of the code is needed I can provide that but this was the chunk I was having problems with.
Thanks
Well I fixed all but one error so far with moving one of the brackets from on top of the cout statements to right under the void area. I also removed the else from the whole project and now it doesn't throw any errors but it doesn't work properly still.