We are about to switch to a new forum software. Until then we have removed the registration on this forum.
When I make an arraylist like this: > ArrayList location = new ArrayList(); < And I want to add a new PVector to this arraylist I think the program reads it as the function PVector.add(PVector); However, instead of adding some value to a vector I want to add a new PVector to the arraylist, how can i do this?
Answers
Please post an MCVE that demonstrates the problem.
Thank you! While making the MCVE I found the solution, Thanks a lot :)
The reference shows an example, not using PVector but another class called particle:
https://processing.org/reference/ArrayList.html
Following the example, you will need to do this:
I hope this helps,
Kf
PVector::add() method isn't the same as ArrayList::add():
Also, look up how to declare a container using the angle brackets in order to specify its type content:
https://Processing.org/reference/ArrayList.html