We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Syntax error?? (Read 838 times)
Syntax error??
Apr 10th, 2010, 3:29pm
 
Hi, can anyone help me, please?

While I was writing a code with processing, I got an syntax error:

syntax error on token "*", invalid assignmentoperator site
Pixel * rangeX_l;
Pixel * rangeX_r;

Pixel is a class that written by me.
Re: Syntax error??
Reply #1 - Apr 10th, 2010, 4:47pm
 
I guess because you can't multiply a class name by something. Unless you are trying to declare a pointer like in C++? Pointers like this don't exist in Java.
Re: Syntax error??
Reply #2 - Apr 11th, 2010, 1:27am
 
Indeed looks like C++ code for me... Smiley
You don't need pointers in Java, variables holding classes are actually holding only a reference to the class' instance, so are already pointers.
Re: Syntax error??
Reply #3 - Apr 11th, 2010, 7:57am
 
Yes,I thought the same way of writing codes as c++ will work here.Anyway,thanks very much for you all.
Page Index Toggle Pages: 1