Hello everyone, I am having a slight snag in a program I am creating due to my complete lack of prior objective c knowledge. Anyhow, what I want to do is very simple:
Code:
double *latpull = [item objectForKey:@"latitude"];
double *longpull = [item objectForKey:@"longitude"];
CLLocation *videoLocation = [[CLLocation alloc] initWithLatitude: *latpull longitude: *longpull];
CLLocationDistance distance = [newLocation getDistanceFrom:videoLocation];
All I am trying to do is substitute values in after initWithLatitude: and longitude:. I am pulling in the numbers for a plist file, and an NSLog reveals that this part is working. Also, if I put in hard values for the CLLocation allocation, this works as well. The documentation states that the latitude and longitude numbers should be doubles, if I read it correctly.
The above code runs with no errors, but fills in 0.00000 for both latitude and longitude when I do an NSLog on videoLocation. I also get a warning for each double statement - warning: initialization from incompatible pointer type.
I know this is a silly mistake for anyone with a hint of coding knowledge, but any assistance would be greatly appreciated! Thanks!