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
Array not starting where I want
Array not starting where I want
Oct 9, 2016 at 10:16pm UTC
dawnstar
(13)
Thank you guys!
Last edited on
Oct 9, 2016 at 10:54pm UTC
Oct 9, 2016 at 10:36pm UTC
ar2007
(210)
line 41: change size with size+1
Last edited on
Oct 9, 2016 at 10:39pm UTC
Oct 9, 2016 at 10:37pm UTC
Zhuge
(4664)
The simple way is to, when reading input from the user to index into the array, subtract 1 from the input. When displaying an array index, add 1. You may also want to do a range check on the input to make sure you stay in bounds.
Topic archived. No new replies allowed.