|
Author |
Topic: C++ style Dynamic Data question (Read 264 times) |
|
Orca
|
C++ style Dynamic Data question
« on: Nov 28th, 2004, 6:16am » |
|
Hi, I love processing, but I'm a C++ programmer who has very little Java experience. If I don't know how many instances of an object I'll need at run time, or I need to randomly remove instances from a container, what's the best approach to take in Java/Processing? I'm used to being able to solve this kind of problem with a linked list, but that's obviously a very C++ style solution... Thanks, and sorry about the newbie question!
|
|
|
|
Orca
|
Re: C++ style Dynamic Data question
« Reply #2 on: Nov 28th, 2004, 7:51pm » |
|
Hey, thanks!
|
|
|
|
cello
|
Re: C++ style Dynamic Data question
« Reply #3 on: Nov 28th, 2004, 8:00pm » |
|
You can make a linked list in java. Code: class Node { Node next = null; int data; } |
| Objects in java are by reference, so it's not terribly different from using pointers in c++. Marcello
|
|
|
|
|