I'm not surprised.
There is so much wrong with your program. One example that leaps out as I am typing this:
for(int i = m ; n > 0 ; i-- )
{
cout << cur->next << "yay" ;
exit(0);
}
I am so glad that the loop is irrelevant - you exit the application on the first iteration - but if you didn't, what changes "n"? What moves "cur" to stop it showing the same line, over and over, and over?
That this is inside another loop that can't end either hardly seems mentioning.
Go back to the beginning. Check your code, and run it through the debugger. I think you have to look at everything you have done, and see if it works, and why it works, before you start moving on.