Okay, so my homework assignment states, "use the for_each algorithm to print out the contents of a vector of doubles using the display function." Here is what i have, but how do i get it to send a double to display when all i have is a vector of doubles?
using namespace std;
void display (double n);
for_each(numbers.begin(), numbers.end(), display(/*what goes here*/));
void display (double n)
cout << n << endl;