hello, i'm trying to write a code for entering a number(n) of strings and then fill a vector with those strings, but will let me enter n-1 times using for loop. is this because of the way getline() works? because with cin>>, it works perfectly.
it ran n times: print v.size() if you don't see it.
The first time it ran, it consumed the rest of the user input that was waiting to be consumed after "cin << n;", most likely a single newline character, returning an empty string.