So I am trying to call a module {assestTickets} and for some reason I am not able to do so. I am getting a no matching function error. I was wondering if a fresh set of eyes could help point out my error. It is probably really simple to find but I cant seem to find it. Thanks for the help !
void inputData(string &plates, double &timeA, double &timeB, double &speedLimit, int &counterPlates)
{
cout <<"Enter a License plate number -->";
cin >> plates;
if (plates != "DONE")
{
counterPlates = counterPlates + 1;
cout <<"Enter tine at checkpoint A -->";
cin >> timeA;
cout <<"Enter tine at checkpoint B -->";
cin >> timeB;
cout <<"Enter speed limit in the zone -->";
cin >> speedLimit;
}
}
void assestTickets(double &rate, double timeA, double timeB, int &hours, int &minutes, double &speed, int time, double speedLimit, string plates, int &counterTickets, double &ticketAmount, int timeGap, int difference)
{
timeGap = timeB - timeA;
hours = timeGap / 1 * 60;
minutes = timeGap % 1;
time = hours + minutes;
speed = (time / 5) / 60;
difference = (int)speed - (int)speedLimit;
if (plates != "DONE")
{
if (difference < 5)
{
cout << "No ticket is issued to " << plates << ".\n";
cout << " \n";
}
else if (difference >= 5 && difference <= 20)
{
rate = 5.00;
ticketAmount = 150.00 + rate * difference;
cout << "A ticket of $" <<ticketAmount <<" is issued to " << plates <<".\n";
cout <<" \n";
}
else if (difference > 20)
{
rate = 10.00;
ticketAmount = 150.00 + rate * difference;
cout << "A ticket of $" <<ticketAmount <<" is issued to " << plates <<".\n";
cout <<" \n";
Since you are also using usingnamespace std; at the top, when you write just time in the parameter what the compiler thinks you are writing is std::time