std::cin.ignore() gets one character and discards it if there is one to get. In this case, the character in question is the '\n' left over from cin >> d;. Since it successfully discarded a character, it doesn't need to pause.
At the risk of being flamed, I suggest just using system("pause") to keep your program open until you press a key. There's a huge debate about whether this is the "right" way to do it, but if you're just coding a small program to learn C++ (which is what it seems) then this is the easiest route in my opinion.
Hello I am a UAT student and I am taking a C++ class. I couldn't help but read this forum about cin.ignore(). Well if your just keeping it system("pause") does work but i've heard there is some trouble with that. If you want to go with that do so but if not you could always but cin.get() instead of ignore(). Get() waits basically untill you press a key same as pause so which ever one works. Here is the code if you are confused where to put cin.get().
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
usingnamespace std;
int main(){
char b[100];
int d;
cin>>b;
cin>>d;
cin.get();
return 0;
}