Re: C function in a C++ code

From: White Wolf (wolof_at_freemail.hu)
Date: 01/25/05


Date: Tue, 25 Jan 2005 22:34:33 +0200

kak3012 wrote:
> Hi,
>
> I have a C based code but the main code is in C++ so I want to call the
> function from C++ file.
>
> I have added
>
> extern "C"
> {
> }
>
> at the begining of the C++ code.
>
> All I am doing is sending to arrays and getting back a single one. It
> does not come right, so I have writtine out the first number before
> sending to C function and when the C code gets it.
>
> it is 1.186674 when I am sending but it is 0.611370 when function get it.
>
> How does this happend? Anything else to do to use a C function in C++?

Talk is cheap, show some code! :-)

-- 
WW aka Attila
:::
According to my calculations the problem doesn't exist. 


Relevant Pages

  • Re: Single precision floating point calcs?
    ... Is there any way to do single-precision floating point ... variables into single-element arrays, ... differences between 64-bit prototype calculations in Python and ...
    (comp.lang.python)
  • Re: Super duper hype fast FET driver?
    ... commercially successful gold or otherwise doped PNP transistors. ... just some cheap NPN arrays would be really nice. ... I don't think there's a market for those. ...
    (sci.electronics.design)
  • Re: Super duper hype fast FET driver?
    ... commercially successful gold or otherwise doped PNP transistors. ... just some cheap NPN arrays would be really nice. ... I don't think there's a market for those. ...
    (sci.electronics.design)
  • Re: Fast array access
    ... > arrays. ... >> The code is slower than C, because Java performs array bounds checking ... >> there might be a JVM or some native libraries out there that can ... > doing many calculations in each native call rather than just accessing ...
    (comp.lang.java.programmer)
  • Re: Super duper hype fast FET driver?
    ... commercially successful gold or otherwise doped PNP transistors. ... just some cheap NPN arrays would be really nice. ... I don't think there's a market for those. ...
    (sci.electronics.design)