Hey I have a pretty simple question to be answered. I assigned elements of my array to string values. I want my code to output the string instead of the element value. Here is an example:
double stock[5] = {249.99,49.99,13.99,449.99,59.99};
double Beats = stock[0];
double iPod = stock[1];
std::cout << "Okay, you purchased " << stock[0] << endl;
The output I would like is "Okay, you purchased Beats." . The output I recieve is "Okay, you purchased 249.99."
How can I make it print the string instead of the value? Thank you in advance.