Obj-C/C question (basic?)
Obj-C/C question (basic?)
- Subject: Obj-C/C question (basic?)
- From: Hisaoki Nishida <email@hidden>
- Date: Sat, 19 Oct 2002 03:33:45 -0400
Hi,
I need some quick help with my code.
The solution may be pretty basic..
There's a method with the prototype:
int someCmethod(struct foo *arg);
Obviously I need to pass it the address of myStruct.
But myStruct is of type struct bar, which is of the same size as struct
foo.
So I cast it (i am talking about sockaddr_in and sockaddr, if you know
these structs in C):
int a = someCmethod((struct foo *)&myStruct);
But what if I want to pass it a return value from my obj-c method:
- (struct bar *)objcmethod;
How would I put the return value directly in someCmethod?
int a = someCmethod((struct foo *)*[someobj objcmethod]);
That wouldnt work... would it?
Help greatly appreciated.
-Yuki
_______________________________________________
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.