hey how to make an object move in an C graphics program, eg; i have drawn a swing and i want it to move...
i am beginner in C graphics program so please help me...:(

Clear the screen, then draw it again in a slightly different position.

Keep doing that.

Steps:
1. Draw a object at (x,y) position on screen.
2 Hide the object
3. Calculate new (x,y) position
4. Repeat steps 1-3 until u get the final (x,y) position.

The above stated answers by luckychap and salem is what you need to do to make your swing move ie clear and redraw.
But instead of clearing the entire screen its better to clear only a part of the screen.You can just go through the concept of VIEWPORT and move on with it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.