I'm guessing cin.ignore() is just there to prevent the window from closing? If so, just replace it with a simple cin >> command. I don't think those can go wrong.
Have you tried system ("Pause")? lol, I couldn't resist. DON'T DO IT! lol, I'm only kidding, I don't really care. Don't do it anyway.
cin >> command requires and extra variable (or reuse/ misuse of one of your other variables). Simply use:
1 2
cin.clear ();
cin.get ();
What it sounds like is that the OP is trying to pause the program then d something after continuing after hitting enter. The program then executes the line of code provided at which point it crashes. It looks messy and not fun (not that it was coded poorly, I just don't understand what you are trying to accomplish, especially out of context) so hopefully someone else can help you.