You can't just write: scanf("%d", variable); You must write: scanf("%d", &variable); HTH -- Daniel Dalton http://members.iinet.net.au/~ddalton/ daniel.dalton47@xxxxxxxxx __________View the list's information and change your settings at //www.freelists.org/list/programmingblind