In array I do have two values value1=”234.3423″ value2=”12.60348″ i need to pass this value to varable double x, double y;
How to do this
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, you need to turn them into the number (which you’re giving in C string syntax here) into an NSString:
Then, simply do this:
That’s it. If the simple number parsing of
NSStringis not enough for you, you will need to look intoNSNumberFormatter.