Taking input using getline

how to take input using getline fuction when we are using a vector of string as v[i] does not work in this case

@gagangoyal674
hello gagan,
it will work,
if u declare ur vector as
vector< string > v(n); //here n is number of strings

cin>>v[i] will work

hii sir it’s not working here it’s showing error without any description

pls share screenshot of the error u r getting

once check this -> https://ide.codingblocks.com/s/206706

sir i have shared in class group

may be i m not there ,if possible pls send it here.

also do check this -> https://ide.codingblocks.com/s/206706

Thank u sir i was using the wrong pair of bracket now i have got it