OK, so this is my code:
cout << "What is your p value?" << endl;
unsigned long long p;
cin >> p;
cin.ignore();
cout << endl;
cout << "What is your q value?" << endl;
unsigned long long q;
cin >> q;
cin.ignore();
cout << endl;
I put the first huge value--that is, p--in, and something gets put in to q automatically even with these cin.ignore()
's. What issues am I not seeing here? Please let me know if you need more information if it's not obvious to you.
[Adding information from a comment: the input value was 92896134244099469431
, which exceeds 266.]