Board index » cppbuilder » Error "list index out of bounds(0)"

Error "list index out of bounds(0)"

Dear sir.

I have a problem like this below when executing.
Error message is  "list index out of bounds(0)".

Thanks for your help.

begin 666 s...@asri.snu.ac.kr.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..CMS=6Y 87-R:2YS;G4N86,N
M:W(-"D9..G-U;D!A<W)I+G-N=2YA8RYK<@T*14U!24P[4%)%1CM)3E1%4DY%
M5#IS=6Y 87-R:2YS;G4N86,N:W(-"E)%5CHQ.3DY,3$Q.50P.30W,#E:#0I%
*3D0Z5D-!4D0-"@``
`
end

 

Re:Error "list index out of bounds(0)"


Quote
: martin.kl...@weinholdpartners.com wrote:
><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
><html>

Martin, please do not post HTML messages. Many excellent news readers do
not display HTML messages and many people (including me) thus cannot read
what you write.

In order to turn off HTML posting in Netscape Communicator,

* Right-click on the entry for this newsgroup
* Select Properties...
* Uncheck the "Can receive HTML" box

Repeat this for every newsgroup on the Borland server. Thanks!

--
General information:
  * Post to the right group - http://www.borland.com/newsgroups/
    * Do not cross- or multipost
      * Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
(TeamB - http://www.teamb.com/)

Re:Error "list index out of bounds(0)"


Quote
: "SWHa" <s...@asri.snu.ac.kr> wrote:
>I have a problem like this below when executing.

Please post 5 lines of source code that produce your problem. There are
many causes for this exception.

--
General information:
  * Post to the right group - http://www.borland.com/newsgroups/
    * Do not cross- or multipost
      * Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
(TeamB - http://www.teamb.com/)

Re:Error "list index out of bounds(0)"


Maybe the cause is because you have some code like this:

for (i = 0; i <= List->ItemCount; i++)
{
    ...

Quote
}

The problem is the "<="; you should use "<" instead of "<=". Remeber that if
you have 5 items, and you start counting from 0 (as you should do), the 4
item is the last item.

Hope that helps...

Rodrigo Gmez

SWHa <s...@asri.snu.ac.kr> escribi en el mensaje de noticias
8135ut$l...@forums.borland.com...

Quote
> Dear sir.

> I have a problem like this below when executing.
> Error message is  "list index out of bounds(0)".

> Thanks for your help.

Re:Error "list index out of bounds(0)"


I get this when my TPageControl gets confused (after docked forms are
deleted). Do you know what List it is talking about?

    Mike.

Quote
Rodrigo Gmez <rgo...@ags.ciateq.mx> wrote in message

news:814t45$56m8@forums.borland.com...
Quote
> Maybe the cause is because you have some code like this:

> for (i = 0; i <= List->ItemCount; i++)
> {
>     ...
> }

> The problem is the "<="; you should use "<" instead of "<=". Remeber that
if
> you have 5 items, and you start counting from 0 (as you should do), the 4
> item is the last item.

> Hope that helps...

> Rodrigo Gmez

> SWHa <s...@asri.snu.ac.kr> escribi en el mensaje de noticias
> 8135ut$l...@forums.borland.com...
> > Dear sir.

> > I have a problem like this below when executing.
> > Error message is  "list index out of bounds(0)".

> > Thanks for your help.

Other Threads