In C++ the size of an array must be determined at the compile-time.
I want to write a simple code in C++, say, to do a naive matrix multiplication with itself (for a matrix that is square in size) and I want to do it for any matrix size. However, I do not know how I can get the matrix sizes or the matrices of various sizes at the run-time in C++.
I have read that there are two types of memory, stack and heap. It seems the size of arrays on stack must be determined at the compile-time while the size of an array on heap can be determined at rune-time.
I also know that Numpy can get the size of an array from the user in Python and create an array in C/C++, so, the way Numpy do this might be the solution.
Does Numpy do compilation after getting the size of an array from the user? or are Numpy arrays created on the heap?