(C++) Assertion failed: !"Bad error code", file VMem.c, line 715
myInterface
Full error message
Assertion failed: !"Bad error code", file VMem.c, line 715 |
Cause
IDE: C++ Builder 6.0
Project type: VCL
Appears when linking the following code:
#define ARRAY_SIZE 10000000
|
Solutions
When this error occurs, restart C++ Builder and nothing has been lost. Do change the code as in one of the examples below.
Decrease the value of the array size
#define ARRAY_SIZE 1000000
|
Create the array dynamically
#define ARRAY_SIZE 10000000
|
Use a std::vector (preferred)
#include <vector>
|