Assertion failed: ! Empty( ), file C:\Martin\MalikChapter7\corrupt2.cpp, line 56
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Process returned 255 (0xFF) execution time : 33.023 s
Press any key to continue.
I have defined another copy stack function. The program compiles OKAY!!!
but when I run it, it still gives an error on line 58 the assert is still failing.
1 2
Assertion failed: ! Empty( ), file C:\Martin\MalikChapter7\corrupt2.cpp, line 58
Well making something compile is just the easy part.
> I have defined another copy stack function. The program compiles OKAY!!!
Yeah, but did you bother to call it?
If you're not calling it at all, or it does the wrong thing, then your assignment operator does nothing and you're still looking down the barrel of the assert.