int value(0);
while (!(std::cin >> value)) { //THIS LINE RIGHT HERE IS BUGGING ME(am really a noob)
cout << "you entered a non-digit character\n";
cin.clear();
cin.ignore();
}
this just stops people from entering letters instead of a number but i wanna know HOW it does it