> When I call a function through a pointer I get a stack overflow.
>My guess is that you have some (hidden) loop in your code that keeps calling
>in a call in a call in a call...
Nope. The problem happens immediately when I attempt to step into the
function being called.
The stack overflow is just one of several crash symptoms.
I don't understand MC++ at all well. I can truly understand why Carl
Daniel said in Message-ID: <Os7Fnbi7FHA.2816@tk2msftngp13.phx.gbl>,
"Managed Extensions for C++ are a collection of syntax and semantic
extensions to C++ supported by VC++ 2002 (7.0) and later. This is a
fully ISO conforming extension, using lots of ugly __prefixed names for
new features. Managed extensions doesn't expose everything that the .NET
platform has to offer and has not been very well accepted."
I read somewhere (I think) that MC++ does not support pointers to
functions. This would make a certain amount of sense since it might
confuse the garbage colector.
Like I said, I don't understand MC++ at all. I have to use MC++ 2003
because it was specified in the contract I have but, ugh, it is ugly.
I do like (a lot) the "object orientation" of the .Net environment. But
slapping try/catch/finally and a lack of being able to put managed
objects on the stack and being unable to declare friends in public __gc
classes, etc., is just, well, awful.
Ralph
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
David Wilkinson - 22 Nov 2005 11:41 GMT
> I don't understand MC++ at all well. I can truly understand why Carl
> Daniel said in Message-ID: <Os7Fnbi7FHA.2816@tk2msftngp13.phx.gbl>,
[quoted text clipped - 16 lines]
> objects on the stack and being unable to declare friends in public __gc
> classes, etc., is just, well, awful.
Ralph:
Can you switch to Visual Studio 2005? There MC++ is replaced by a new
language, C++/CLI, with a much more pleasant syntax, and some real
improvments like automatic deterministic destruction. The old MC++
syntax still works, but is deprecated. An automatic translator was
"promised", but has not materialized. Visual C++ Express is free.
David Wilkinson
Olaf Baeyens - 22 Nov 2005 12:21 GMT
> Nope. The problem happens immediately when I attempt to step into the
> function being called.
>
> The stack overflow is just one of several crash symptoms.
In my case it is because it is because in the function I call myself
accidentially.
Allocating too big of local memory could also cause a stack overflow.
For example a huge array. Better to allocate using a 'new' in that case.