Line drawing

hai,
i need your help
at present i am developing some simple componets for game

on that i have one problem

ie. there is 2 parallel row of images

user have to draw a line(stright line only) from one picture to other picture(like connecting two picture which are all in parallel)

user can possible to delete a particular line which is conneted earlier (some thing like undo, reddo)

so i need to store the each and every action of drawing
shall i use array to store those values
i want urgent reply
so please help me
thanks for your time