I have to read in an undetermined amount of 5 character strings from the keyboard, all entered in one line. Valid input for example, with each example on a new line:
I need to get each 5 character string from the input and store them all into an array. I do not know how to do this.Code:BBBBG YPZAA ABCD6 BBBBG WANAB REWWW ZZAA0 PPP14 AAAAC BBBBE CCCC5 ABCD4 QQQ3R ERFG8 AAAAB CCC14 QQQQD ZZZZ4 ZE_B12 AAAAC BBBBE CCCC5 ABCD4 QQQ3R ERFG8 PPP14 REWD2
For testing I just faked it, using "cin >>" five times. I need to expand tha to accept as few as 1 and as many as 20.
Thanks for your time and help.



LinkBack URL
About LinkBacks


