AlleyBoo
asked on
Class void function not accepting parameter
I have a class vendor created. I have a public function call loadmachine. Example: void Vendor::loadmachine(); I want to read in a file to Loadmachine in my main program
Example:
sodaMachine.loadmachine(if stream& fileName).
{
inFile.open;
}
I am getting error c2061 syntax error identifier ifstream in my vendorType.h file. The function reads void Vendor::loadmachine().
As you can probably see, I am new to programming. I have tried just place the items from the file into the function. sodaMachine.loadmachine(ca ns, bottles) neither functions work. Any assistance would be appreciated.
Example:
sodaMachine.loadmachine(if
{
inFile.open;
}
I am getting error c2061 syntax error identifier ifstream in my vendorType.h file. The function reads void Vendor::loadmachine().
As you can probably see, I am new to programming. I have tried just place the items from the file into the function. sodaMachine.loadmachine(ca
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Split between Arthur_Wood and mayankeagle.
fine with me.
AW
AW
Please close it now.
second the motion
AW
AW