If you have reduced the array of a fixed size and if its size is too large, you may get this error.
int fixedarray[1000000000];
Try to reduce the length or create it on the heap.
int * array = new int[1000000000];
Remember to delete it later.
delete[] array;
But it is better to use std :: vector instead of pointers even in the C function,
//... int Old_C_Func(int * ptrs, unsigned len_); //... std::vector<int> intvec(1000000000); int * intptr = &intvec[0]; int result = Old_C_Func(intptr,intvec.size());
assuming 32 bit compilation.
ali_bahoo
source share