Strings Input

How to input number of strings lines when the user enters the number of those lines ?!


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?
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 :)
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.