I want to store the value of specific characters from the user input? like for example:
#include <iostream>
#include <string>
int main(){
int useryear;
std::cout << "\n\tType your favourite year:\n";
std::cout << "\t >> ";
std::cin.ignore(0);
getline(std::cin, useryear);
return 0;
}
So, for example the user entered 1933 How to store only the 19?? or the first two characters they typed?
I think to store the 33 i have to change "cin.ignore(0);" to "cin.ignore(2);"