I started yesterday learning SDL so i am sorry if my source is bad or i have done stupid errors.
http://pastebin.com/6Lufhc8z
Here is my source.
The program run perfect,but when i click the buttons(right,up,left,down) to move the image(spongebob),the image is not moved,it is in the same place all the time.
Any help?
With the parameters you pass to draw, that will only move the upper left corner of SpongeBob. If you want to move the whole SpongeBob you could simply use your apply function as apply(dstX1,dstY1,bob,screen);
I second monad^^^. Lazyfoo is a GREAT place to learn SDL although there will be times, IMO, where you'd have to do some extensive research on your own.