What??

My code works without an error and gives what I want but at the end when I press enter after cin.ignore()it gives the error below:

Unhandled exception at 0x643cad4a (msvcp100d.dll) in diffusion only.exe: 0xC0000005: Access violation reading location 0x00000019.

And shows that the problem is at "xutility" header:
*_Pnext != 0; *_Pnext = (*_Pnext)->_Mynextiter)


Regards
I'm guessing cin.ignore() is just there to prevent the window from closing? If so, just replace it with a simple cin >> command. I don't think those can go wrong.
Have you tried system ("Pause")? lol, I couldn't resist. DON'T DO IT! lol, I'm only kidding, I don't really care. Don't do it anyway.

cin >> command requires and extra variable (or reuse/ misuse of one of your other variables). Simply use:

1
2
cin.clear ();
cin.get ();


What it sounds like is that the OP is trying to pause the program then d something after continuing after hitting enter. The program then executes the line of code provided at which point it crashes. It looks messy and not fun (not that it was coded poorly, I just don't understand what you are trying to accomplish, especially out of context) so hopefully someone else can help you.
Last edited on
Topic archived. No new replies allowed.