• 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
Re: C++ structs in .mm file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ structs in .mm file


  • Subject: Re: C++ structs in .mm file
  • From: Phillip Mills <email@hidden>
  • Date: Wed, 26 May 2004 13:21:58 -0400

On Wednesday, May 26, 2004, at 10:59 AM, GM Lopes wrote:

Does anybody have some hints, what to do? Maybe I'm just missing some compilator flag or smth?

Here's about as simple an example as it gets. I created a new project as a Cocoa Application, then added one Objective-C class called mmtest.mm. (It also builds OK if I move the struct definition into its own header.)

// ** HEADER FILE ** mmtest.h
#import <Cocoa/Cocoa.h>
struct mmtesting {
int data;
};
@interface mmtest : NSObject {
}
- (void) doSomething;
@end

// ** IMPLEMENTATION FILE ** mmtest.mm
#import "mmtest.h"
@implementation mmtest
- (void) doSomething
{
struct mmtesting *mm = new mmtesting();
delete mm;
}
@end

........................
Phillip Mills
Multi-platform software development
(416) 224-0714
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >C++ structs in .mm file (From: "GM Lopes" <email@hidden>)

  • Prev by Date: Re: Copy/Paste not working from keyboard
  • Next by Date: Re: Looking for Cocoa diff and hash objects/ library
  • Previous by thread: C++ structs in .mm file
  • Next by thread: Re: C++ structs in .mm file
  • Index(es):
    • Date
    • Thread