#include class C { public: typedef int t; C(); C(t); t i; } c; C::C() { i = 9; } C::C(t x) { i = x; } @interface Foo : Object { @public C::t i; } - (C::t) bar; @end @implementation Foo - (id) init { if ((self = [super init])) i = 5; return self; } - (C::t) bar { return i; } @end int main() { Foo *foo = [[Foo alloc] init]; C c = C([foo bar]); printf("%i %i\n", foo->i, c.i); }