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
Repeating char array
Repeating char array
Jun 29, 2010 at 11:20pm UTC
fafner
(377)
I'm writing a program in which the user enters text into a char array. I then need to "extend" that text, so that the text is repeated over and over again until the number of chars equal a generic value. Does anyone know of a good way to do that?
Jun 30, 2010 at 12:02am UTC
Athar
(4466)
while
(repStr.length()<genericValue)repStr+=shortStr;
Jun 30, 2010 at 4:07pm UTC
fafner
(377)
Awesome, thanks;)
Topic archived. No new replies allowed.