Skip to content

Instantly share code, notes, and snippets.

@kylesluder
Created October 8, 2010 21:06
Show Gist options
  • Save kylesluder/617545 to your computer and use it in GitHub Desktop.
Save kylesluder/617545 to your computer and use it in GitHub Desktop.
#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