This is the whole function

Code:

double itemshipping(double price, double weight, int quantity, int tax) {
//declare some intitail variables.
double shippingweight, shippingcost, total;
//calculate original cost before shipping costs are added.
//find out total cost of shipping.
price *= quantity;
shippingweight = weight * (double)quantity;
//setup logic statements to recognize how much to charge per pound for shipping
if (weight <10)
shippingcost = shippingweight * 4.00;
else if (weight >=10 && weight <30)
shippingcost = shippingweight * 2.5;
else if (weight >=30 && weight <50)
shippingcost = shippingweight * 1.5;
else
shippingcost = shippingweight *.99;
//setup logic statements to recognize whether
//an item is taxed or not and apply this to
//the final cost with the cost of shipping added in.
if (tax == 1) {
price += shippingcost;
//total = price + (price * TAX_RATE);
return total;
}
else if (tax == 0){
total = price + shippingcost;
return total;
}
}

This is the whole function

this is how TAX_RATE is defined
Code:

#define TAX_RATE = 0.065

Also if it were a bracket error shouldn't I still get an error message when trying to compile after commenting out the bad line?