Some suggestions, altough I still believe you are in the wrong place to ask for help:
- http://bytes.com/topic/c/answers/552049-random-movement
- http://www.dreamincode.net/forums/topic/17875-random-movement-in-c/
- http://stackoverflow.com/questions/12886596/random-movement-of-a-character-in-a-matrix