You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int size = sizeof(prices)/sizeof(prices[0]); // calculates number of elements in array
double total = getTotal(prices, size);
std::cout << "$" << total;
return 0;
}
double getTotal(double prices[], int size)// when a function recieves an array it decays to a pointer to that array and no longer knows the size of the array so you must also give it the size