i am making a snake game of my own way ,, so
i want to check on four sides of tail coordinate of snake (up,down,right,left)
if there is a '*' if there is then i have to move tail coordinate to that coordinate
Just use an 2D array to store the coordinates of all parts of snake, or just use a 80x25 array of the screen and keep updating it as you print or remove something from the screen. You can just see this http://www.cplusplus.com/forum/beginner/89565/