Memory allocation problem C/Cpp Windows critical error
- by Andrew
Hi!
I have a code that need to be "translated" from C to Cpp, and i cant understand, where's a problem. There is the part, where it crashes (windows critical error send/dontSend):
nDim = sizeMax*(sizeMax+1)/2;
printf("nDim = %d sizeMax = %d\n",nDim,sizeMax);
hamilt = (double*)malloc(nDim*sizeof(double));
printf("End hamilt alloc. %d…