I do apologize if this has been asked before, but I haven't really seen this come up in my books or in other examples. So here I go.
I have been getting into a card game, after getting lazy with constant shuffling I made a program that does it for me, theoretically. I realize there are already programs that do so, but where is the fun in that? Onto the problem that led to the question. Whenever I typed in a card with a two or more word name, it chopped off all the words but the first. I have known this to happen but I don't know how to fix it normally. Let alone how to store "A, the C" in a vector and keep spaces.
The Question: How do I store a string like "A, the C" in a string and put it in a container and be able to retrieve it with the spaces in tact? Am I doing something wrong in the code, or am I using the wrong tool for the shed?
#include <iostream>
#include <string>
using namespace std;
int main()
{
string example = " ";
cin >> example; //typed eggs and milk, only got eggs
cout << example << endl;
}