Assuming arg1
is pointing to some sort of double you want:
- (void) _getPoints: (double*)arg1
{
NSLog(@"%f", *arg1);
}
You might want to refer to pointer tutorial to understand what is going on, such as this.
質問
- (void) _getPoints: (double*)arg1
{
NSLog(@"%f", arg1);
}
This works for double
and float
, but not double*
. Any help is appreciated.
解決
Assuming arg1
is pointing to some sort of double you want:
- (void) _getPoints: (double*)arg1
{
NSLog(@"%f", *arg1);
}
You might want to refer to pointer tutorial to understand what is going on, such as this.
他のヒント
Consider replacing arg1
with arg1 ? *arg1 : @"null"