You'll have to give more details about your program. Is this an event driven program, where you have an event loop and objects that are hooked into the event loop? If you don't know what an event loop is, then chances are the answer is "No."
If you do have an event loop, then the projectile will need a velocity property that includes both speed and direction and its current position. It will then implement an appropriate hook method to recalculate its new position. Another hook method, usually called draw() will just draw the image based on its current properties, i.e. its current position on screen.
If you don't have an event loop, you could spawn off a
thread that starts drawing the projectile from the character's current position, then calculates new coordinates and redraws the projectile's image every so often at the new position. The thread ends when the projectile's position "falls off" the visible portion of the display.