}
carsFile.close();//close file
}
else{ cout << "No such file\n\n";}
//delay
system("pause");
return 0;
}
||In function 'int main()':|
|114|error: no match for call to '(std::string {aka std::basic_string<char>}) (std::string&, std::string&, int&, std::string&, std::string&, std::string&)'|
'std::string' has no member named 'setUpCar'|
expected ';' before 'PassengerCartemp'|
'PassengerCartemp' was not declared in this scope|
||=== Build finished: 4 errors, 0 warnings (0 minutes, 0 seconds) ===|
Just look at the line of the error. What is that comma doing there? Is the first FreightCar supposed to be the type? You probably meant Car in that case.
yes
error: no match for call to '(std::string {aka std::basic_string<char>}) (std::string&, std::string&, std::string&, int&, std::string&, std::string&, std::string&)'
Make two classes that inherit from the Car class: FreightCar and PassengerCar.
Each class will need a default constructor, a copy constructor, and a constructor that has five parameters