Saturday, January 11, 2014

ios parameter as a function of output.

ios parameter as a function of output.

Brother wrote a function as the value assigned to Target wants Source as output, but the output can not now ask how to modify the next?

- (Int) Copytest: (NSData *) Source Target: (NSData *) Target
{
Target = Source;
return 0;
}
Reply:
Doing
 
- (Int) Copytest: (NSData **) Source Target: (NSData **) Target
{
* Target = * Source;
return 0;
}

Reply:
Local calls wrote:
 

NSData * dataA = [[NSString stringWithFormat: @ "AAA"] dataUsingEncoding: NSASCIIStringEncoding];
NSData * dataB = nil;

[Self Copytest: & dataA Target: & dataB];

No comments:

Post a Comment