-
C++ to Java
We're making a program in java, and we have the source code in c++, so we
just have to translate this code to Java, and we have a problem, one of the
files we have in c++ is a tree implementation, and we don't know how to make
a pointer in java.
If anyone of you has a tree implemented in Java, or knows the answer to our
problem, please send it to us!
It's very important!!!!
Thanks a lot,
Alice and Cristina
-
Re: C++ to Java
For trees, see the tutorial at
http://java.sun.com/docs/books/tutor...nts/tree.html. You
don't need pointers in Java. Objects are implemented by references that act
the same way as pointers.
Alice and Cristina <alice@jet.es> wrote in message
news:39a2ac54$1@news.devx.com...
>
> We're making a program in java, and we have the source code in c++, so we
> just have to translate this code to Java, and we have a problem, one of
the
> files we have in c++ is a tree implementation, and we don't know how to
make
> a pointer in java.
> If anyone of you has a tree implemented in Java, or knows the answer to
our
> problem, please send it to us!
> It's very important!!!!
> Thanks a lot,
> Alice and Cristina
-
Re: C++ to Java
I don't understand what do you mean by there is no pointer in java. For tree
implementation you don't require any memory access. You can easily implements
the linkage and pointer to next node using simple arrays and Vectors. Remember
all objects references are nothing but pointers. There are lots of books
available for datastructures in java you can have a look at them.
"Alice and Cristina" <alice@jet.es> wrote:
>
>We're making a program in java, and we have the source code in c++, so we
>just have to translate this code to Java, and we have a problem, one of
the
>files we have in c++ is a tree implementation, and we don't know how to
make
>a pointer in java.
>If anyone of you has a tree implemented in Java, or knows the answer to
our
>problem, please send it to us!
>It's very important!!!!
>Thanks a lot,
>Alice and Cristina
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks