Unexpected char '\' error
in
Programming Questions
•
1 year ago
Hi.
Just wondering if somebody could tell me why an 'unexpected char '\' error is being generated in this code?
Thanks
Just wondering if somebody could tell me why an 'unexpected char '\' error is being generated in this code?
Thanks
- int[] xpos = new int[50];
int[] ypos = new int[50];
void setup() {
size(200, 200);
smooth();
for (int i = 0; i < xPos.length; i++) {
xpos[i] = 0;
ypos[i] = 0;
}
}
void draw() {
background(255);
for (int i = 0; i < xpos.length-1; i++) {
xpos[i] = xpos[i + 1];
ypos[i] = ypos[i + 1];
}
xpos[xpos.length–1] = mouseX;
ypos[ypos.length–1] = mouseY;
for (int i = 0; i < xpos.length; i++) {
noStroke();
fill(255-i*5);
ellipse(xpos[i], ypos[i], i, i);
}
}
1