• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mixing Objective C and C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mixing Objective C and C++


  • Subject: Mixing Objective C and C++
  • From: Bert Torfs <email@hidden>
  • Date: Tue, 25 Jan 2005 20:51:47 +0100

Hi all,

I am writing a program where the model is written in C++ (legacy), the view in Objective C and the controller something in between. Every C++ object has an objective C counterpart that acts as a pass-thru to its methods. These objects are created and released as needed. I have not touched the C++ objects until now.
For performance, I added an instance variable to every C++ object that holds its Objective C counterpart. But now simple things like

<x-tad-smaller> double theAmount;
theAmount = currentDebit->localBalance();

</x-tad-smaller>
do not work anymore. While localBalance equals 91797.283316716232, theAmount equals -6.9988350839989206e-268 after the function call.
(the method 'localBalance' does nothing but returning localBalance.).
Any idea?

Thanks a lot,

Bert
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Mixing Objective C and C++
      • From: Kevin Ballard <email@hidden>
    • Re: Mixing Objective C and C++
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Re: Simple question: how can I call 'pbxbuild' from the Darwin prompt (where is it?)?
  • Next by Date: NSArrayController addObject: and rearrangeObjects
  • Previous by thread: Re: Another TableView question...
  • Next by thread: Re: Mixing Objective C and C++
  • Index(es):
    • Date
    • Thread