Maybe it's just me but for some reason when input the size of the string array I can really only input the size I inputted - 1. For instance, If i make my string array be able to hold 4 elements I can only input 3 of those 4 elements with it closing out? I believe the problem lies with the getline function?
At the end of line 21, you have a new line character remaining in the input stream. The extraction operator (>>) reads characters until what is read is no longer an int and then stops reading, leaving the next character in the stream.
When you do the getline, it reads until it finds a new line (and consumes it). In this case, the first character is a new line, so the first read is empty. The extraction operator, on the other hand, skips white space (including the new line) and reads characters to for a string.
In order to get newline to work properly, try the ignore function: cin.ignore(256, '\n');
This will clear out cin and get ready for reading the strings.
Holy crap I never even knew that. Dang you got some good knowledge and vision lol. That's something new to add to my knowledge thanks! I've only ever used cin.ignore with cin.clear for when extraction operator got the wrong input.