Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
please send me the answer of question
Posted
Comments
Michael Waguih 14-Feb-11 3:32am    
You must describe your problem to let others helps you
DaveyM69 14-Feb-11 3:34am    
Without seeing a code snippet of the section that is causing the error it's impossible to help.
The normal issue is trying to get/set yourArray[Count] when the highest element is at yourArray[Count - 1].
Sunasara Imdadhusen 14-Feb-11 3:38am    
Please provide snippet of code where exactly you were found error?
CPallini 14-Feb-11 3:52am    
The solution is avoiding to generate out-of-bounds accesses in arrays. This is what we can say without seeing the actual code.

1 solution

Without your code it is impossible to tell.

When your program gets the exception, the debugger will show you what line has raised the error. Use the debuigger to look at the variables and find which value is accessing an array. Find the value, and check the array length - also in the debugger.

Then either it will be reasonably clear why you are exceeding the size of the array you declared, or you will know which code fragment you need to post in your question so we can help.

Edit your question with a small code fragment around the line that causes the error, and we will look at it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900