Could you enlighten us with some more information? Where exactly does the program not stop?
Also, <iostream.h> is depreciated; use <iostream> instead. void main() is not even legal C++. It must always be int main(). I strongly suggest you update your compiler if it's letting this compile, as it means your compiler is not even compliant with standards set over a decade ago.