Why Stack Overflow???Help!!!!!!!!!!
Hi, there,
I generated a .dll library using managed C++ within .NET framework.
A C# console application was used to test functions in .dll (generated by managed C++).
There is a function "func001" in .dll allocates unmanaged array: double *aa= new double[size];
It always gives me a crash "Fatal Stack Overflow Error", even if size==3.
The problem seems have no trouble to allocate managed arrays. I really do not know why. Please kindly help.
In C#:
Code:
...
NS01.Cls01 mycls = new NS01.Cls01();
mycls.Func001(...);
...
The .dll library in managed c++ is like:
Code:
namespace NS01
{
void Cls01::Func001(...)
{
...
size = (int)(30.3/1.34);
double *tt = new double[size]; // it would not execute this one
...
}
}
Why could "Fatal Stack Overflow Error" happen? There is much memory needed.
I really do not know why. Could anyone please help?
Thank you so much.