views:

45

answers:

0

I make many mistake in the test program!!!

debug src: http://www.cppblog.com/Files/mymsdn/cvector-windows-has-triggered-a-breakpoint-in-cvector.zip

the right version: http://www.cppblog.com/Files/mymsdn/cvector-svn-version-10.zip

I am trying to write a C language version of vector struction.

If I try run (in Microsoft Visual Studio 2008, default short-cut is CTRL+F5) my code. It can execute as the right logical to output right result.

But If I try run it in debug mode(in Microsoft Visual Studio 2008, default short-cut is F5). It will cause a problem: (it's from the output window, and also has a alert frame to report it)

HEAP[cvector.exe]: HEAP: Free Heap block 393168 modified at 393190 after it was freed Windows has triggered a breakpoint in cvector.exe.

This may be due to a corruption of the heap, which indicates a bug in cvector.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while cvector.exe has focus.

The output window may have more diagnostic information.

error