No error or warning during compile and build period.
When I run the problem(debug mode) and when it goes to mu::Parser myParser;
There is an error like this:
Windows has triggered a breakpoint in cascade.exe.
This may be due to a corruption of the heap, and indicates a bug in myParser.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information.
The debug run stops at a xutility file which is a "xutility internal header".
If I continue the run, finally the following error occurs!
Debug Assertion Failed!
For information on how your program can cause an assertion failure, see the Visual C++ documention on asserts.
However, the Release run is ok.
And the codes works well in Visual C++ 6.0 under Debug and Release mode!
I am searching the method to cop with this.
... something is being deleted twice. When ever you do a delete, be sure to set the pointer to 0 so a second delete will not cause issue.
writing into unallocated memory (either on the heap or on the stack).
But the above advice seems not useful!