Hi, there are some errors in your code. First the part:
Code:
//initializierung der Geschwindichkeiten auf vel=0, ypos auf 0
for(int i=0; i=num;i++ ){
waltzen[i].vel=0;
waltzen[i].ypos=0;
}
stands outside any method, this part should be put in the setup statement.
Second one: you call a the ypos() method in the draw function, but this method doesn't exists.
Also the way you use the for loop is a little bit unusual. Your num variable is 3. I think you would have 3 waltzen objects. But you will get 4 (0,1,2,3). So this part: i=num should look like: i<num.
In your class an image should drawn at the screen at the initialization. But the two coordinates are not overload.
I think you look for something like this:
Code:
class Waltzen{
float xpos, ypos, vel;
PImage img;
//initialize the Object and overload an image a the position
//waltzen[i]=new Waltzen(x,y,image)
Waltzen(float i_xpos, float i_ypos, PImage i_img){
xpos=i_xpos;
ypos=i_xpos;
img=i_img;
}
//call waltzen[i].draw() will draw the image to the screen
void draw(){
image(img, xpos, ypos);
}
At last you not need call this in a class to use its variables.