comp.lang.ada
 help / color / mirror / Atom feed
From: Duncan Sands <baldrick@free.fr>
To: "Anthony Moss" <a.m@baesystems.com>, comp.lang.ada@ada-france.org
Subject: Re: calling an ada procedure from C++
Date: Mon, 17 Nov 2003 11:38:40 +0100
Date: 2003-11-17T11:38:40+01:00	[thread overview]
Message-ID: <mailman.16.1069076856.3110.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <3fb24ce4$1@baen1673807.greenlnk.net>

On Wednesday 12 November 2003 16:11, Anthony Moss wrote:
> I have an ada simulation and a windows C++ graphics program already
> created. My task is to transfer the information from the ada written
> simulation to the VisualC++ graphics program. This involves transfering a
> large structure of information from ada to C++. To do this i have written a
> very small program to pass a simple structure from ada to C++, but I am
> getting run time access errors. I will place a copy of the code onto this
> message, so could you tell me what is wrong and how to fix it.
> thanks

Don't return the value on the stack (i.e. via return), use an out parameter.
Standard C does not permit returning structures on the stack IIRC.

All the best,

Duncan.



  parent reply	other threads:[~2003-11-17 10:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-12 15:11 calling an ada procedure from C++ Anthony Moss
2003-11-17  4:04 ` red floyd
2003-11-17  7:37 ` tmoran
2003-11-17 10:38 ` Duncan Sands [this message]
2003-11-17 14:32   ` Hyman Rosen
2003-11-17 18:28     ` Frank J. Lhota
2003-11-18  0:03       ` Ludovic Brenta
2003-11-18  0:32         ` Frank J. Lhota
2003-11-22  5:25           ` Dave Thompson
2003-11-17 21:13 ` sk
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox