cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Strings Input
Strings Input
May 16, 2014 at 9:44pm UTC
Mido14
(28)
How to input number of strings lines when the user enters the number of those lines ?!
May 16, 2014 at 11:27pm UTC
Parasin
(73)
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 UTC
Mido14
(28)
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 UTC
Pter0dactyl
(196)
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.