Created
October 8, 2010 21:06
-
-
Save kylesluder/617545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
class CppClass | |
{ | |
public: | |
void doIt(); | |
} | |
; | |
@interface Foo : NSObject | |
- (void)doSomething:(CppClass &)cls; | |
@end | |
void CppClass::doIt() | |
{ | |
NSLog(@"ASFD"); | |
} | |
@implementation Foo | |
- (void)doSomething:(CppClass &)cls; | |
{ | |
cls.doIt(); | |
} | |
@end | |
int main(int argc, char **argv) | |
{ | |
Foo *f = [[Foo alloc] init]; | |
CppClass c; | |
[f doSomething:c]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment