Strings Input

May 16, 2014 at 9:44pm
How to input number of strings lines when the user enters the number of those lines ?!


May 16, 2014 at 11:27pm
Could you please clarify your question?

Are you asking this:

A user enters number of strings to get, the program then gets said amount of strings?
May 17, 2014 at 12:16am
The user enters the number of lines that have type string ,so how to input string line in a loop.
Thank you for reply and sorry for any misunderstanding :)
May 17, 2014 at 7:19am
cin>>n //n is no of string
for(int i=0;i<n;i++)
gets(s[i]);

is it what you want?
Topic archived. No new replies allowed.