i am doing a task where i am inputting ist no of times you want to have input and then i am inputting a full line by the use of getline but sime how i am not able to do that
for(j=1;j<=test;j++) { getline( cin,s); len = s.length(); cout<
This is reading in the int and the string with the one carridge return.
It reads 1 as the total and then nothing as the string (hence the length of 0). Try 1TEST and this should give you a length of 4.