I am having module troubles

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 !



/* Program:
Author:
Class:
Date:
Description:

I certify that the code below is my own work.

Exception(s): N/A

*/

#include <iostream>
#include <string>
#include <iomanip>



using namespace std;

void inputData(string &plates, double &timeA, double &timeB, double &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);
void displayResult(int counterTickets, int counterPlates, double percent, double averageAmount, double ticketAmount, double total);
int main()
{
cout << fixed << showpoint << setprecision(2);

string plates;
double timeA, timeB, speedlimit, ticketAmount, rate, speed, speedLimit, percent, averageAmount, total;
int hours, minutes, counterTickets, counterPlates;
int timeGap, difference;


counterTickets = 0;
counterPlates = 0;
ticketAmount = 0;
percent = 0;
averageAmount = 0;
while (plates != "DONE")
{
inputData(plates, timeA,timeB, speedlimit);
assestTickets(rate, timeA, timeB, hours, minutes, speed, time, speedLimit, plates, counterTickets, ticketAmount, timeGap, difference);
}
displayResult(counterTickets, counterPlates, percent, averageAmount, ticketAmount, total);




return 0;
}

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";

}

if (difference >= 5)
{
counterTickets = counterTickets + 1;
}
}





}


double totalAmount(double ticketAmount, double&total)
{
total = ticketAmount + ticketAmount;
return total;
}

void displayResult(int counterTickets, int counterPlates, double percent, double averageAmount, double ticketAmount, double total)
{
total = totalAmount(ticketAmount,total);
averageAmount = (total) / counterTickets;
percent = (1.0 * counterTickets / counterPlates) * 100;
cout <<"Tickets were given to " <<counterTickets << " of " <<counterPlates << " vehicles." <<endl;
cout <<"Percent of ticketed vehicles: " <<percent <<" %" <<endl;
cout <<"Average ticket amount: " <<averageAmount <<endl;
cout <<"Program is terminated.\n";
cout <<total;
}




Your 7th parameter in your main assessTickets is "time"

assestTickets(rate, timeA, timeB, hours, minutes, speed, time, speedLimit, plates, counterTickets, ticketAmount, timeGap, difference);

Since you are also using using namespace std; at the top, when you write just time in the parameter what the compiler thinks you are writing is std::time

http://en.cppreference.com/w/cpp/chrono/c/time

Now your compiler tries to convert from time to int, which it cannot do.
Thank you so much! I will use another variable to avoid this problem.
Topic archived. No new replies allowed.