Re: C function in a C++ code
From: White Wolf (wolof_at_freemail.hu)
Date: 01/25/05
- Next message: shez: "Re: Temporary King"
- Previous message: Mike Wahler: "Re: C function in a C++ code"
- In reply to: kak3012: "C function in a C++ code"
- Next in thread: Hariprasad Govardhanam: "Re: C function in a C++ code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: shez: "Re: Temporary King"
- Previous message: Mike Wahler: "Re: C function in a C++ code"
- In reply to: kak3012: "C function in a C++ code"
- Next in thread: Hariprasad Govardhanam: "Re: C function in a C++ code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|