Putting a Variable in Quotations

Hello

I'm trying to put the variable "lotName" into quotations so that it will display it in quotes, not the actual word lotName. How can I go about doing this? I tried doing \"lotName\"" but that actually displays the word lotName instead.

cout << "You won " << lotName << "at a price of $" << bid;

You need to use an escape sequence:
cout << "You won \"" << lotName << "\" at a price of $" << bid;
Topic archived. No new replies allowed.