The getline() function reads until the end of file / beyond end of line.
It copies the line to the provided buffer (-> hold), but not more than the provided size (-> 100).
The end of line char is not copied, but a 0 char is appended
hence in your case hold must be char hold[101]; // Note: 1 more char