This is still wrong:
It should be:Code:int lab1_array[9]
Code:int lab1_array[10]
This is still wrong:
It should be:Code:int lab1_array[9]
Code:int lab1_array[10]
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
You're welcome.Originally Posted by hummingdev
No, the size of the array is 10 (as in you want an array of 10 elements), hence you should declare it as:Originally Posted by hummingdev
However, as was pointed out to you in post #4, the valid indices of this array would be the integers from 0 to 9, inclusive.Code:int lab1_array[10]
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)