|
-
January 19th, 2010, 05:14 PM
#16
Re: for/if/else dilemma
See my earlier post. I took another look and I understand the problem better. I haven't troubleshot that but I will leave that up to you to determine how the user input ends up in the array 4 times. There is nothing wrong with the contents of the for loop.
I'd suggest that if you really want to improve things, use std::string with getline. The user input could easily overrun the destination arrays causing undefined behavior.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|