Re: C++ structs in .mm file
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.