Good day. It is known that dynamic arrays are powerful than static arrays considering the fact that dynamic arrays can handle huge number of arrays unlike in static. However, when I was trying to run my program, it says:
"Unhandled exception at 0x75A7CBB2 in Turk's Method 3D.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x00EFF6E4. occurred"
I don't know where is the part of the problem. I have tried implementing it to all variables in dynamic arrays, but it's kinda like this error is showing on this part?
Normally you get a bad_alloc exception when there is not enough memory for the operator new.
So yes my suspect was that you don't have enough memory for creating so many huge arrays.
If you tell us what you actually want to do someone may find a solution that doesn't involve keeping everything in memory all the time.
Thank you for the response @JLBorges. I am wondering if this "boost/numeric/ublas/matrix_sparse.hpp" library is the best option for handling "bigger" matrices as compared to std::vector and linear arrays?
Your matrix is almost certainly sparse; use a sparse matrix representation.
Hmm, do you mean "dense"? I am not good in terminologies, I just heard this word from my classmates, but I am not sure if it's correct as well.
> I am wondering if this "boost/numeric/ublas/matrix_sparse.hpp" library is the best option
> for handling "bigger" matrices as compared to std::vector and linear arrays?
I can't say if either of these two provide the best option; I've very little experience in this domain. I suspect that what is the best option may depend on the specific problem that you are trying to solve.