Getline ignoring first character of input
Here is signature of cin.ignore:
istream& ignore (streamsize n = 1, int delim = EOF);
So if you call ignore function without any parameters, it will ignore '1' char by default from input. In this case it ignored 'J'. Remove ignore call and you will get 'Jim'.
Just remove cin.ignore();
This ignores the first character, thus you miss the 'J'.