looping graphics?

I can't seem to get it to loop, All i get is the point to be placed but it does not move anywhere. If possible i'd like some guidance. It is suppose to loop by the value of altitude which moves by velocity. velocity 32 ft/sec and max velocity would be 174.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 #include "ccc_win.h" 


int ccc_win_main()
{

    int velocity = 0;
    int alt;

     Point p(0,alt);
     cwin << p;


	while (alt > = 0)
    	{
	   
	    velocity += 32;
	    if (velocity > 174)
	    velocity = 174;
	    p.move(0, velocity);
	    alt -= velocity;
	    cwin << p;
	}
}	

it does not move anywhere.
 
int alt;

- For starters, you haven't initialised alt.
Topic archived. No new replies allowed.