in your constructor you don't need the . operator, you can simply do "totalcars=0" and "amount=0.0". and in your paying car function your loop makes no sense. You are initializing a to zero and the terminator is when a is greater than 0, this doesn't make sense. Also, the 3rd part of the for loop should be a++ not a+1. What exactly do you want the payingcar function to do?
Also, void functions don't return anything, so the return statement won't work.
Im trying to increment a car/truck total and 2.00 dollars to cash total.
I need to keep track how many cars pass by a tollbooth and add 2.00 dollars for each car that pass by the tollbooth