This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcj
- From: bserdar at nc dot rr dot com
- To: "Plapp, Phillip" <phillip dot plapp at hp dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 23 Apr 2004 11:45:34 -0400
- Subject: Re: gcj
- Reply-to: bserdar at nc dot rr dot com
> In my C++ CNI file I access a java ArrayList which contains several
> instances of my class ItemVersionStatistics.
>
> When I enter the line,
> ItemVersionStatistics *ivs = (ItemVersionStatistics)
> arrayListVariable->get(0);
You are typecasting to a ItemVersionStatistics, not to a pointer to it. Try:
ItemVersionStatistics *ivs = (ItemVersionStatistics *)
arrayListVariable->get(0);