I’m creating an application for iOS and I’m stuck on a math issue. I can’t figure out how to multiply a double by an int. Is this even possible?
Here’s where I’m stuck:
double *one = 465654753464353;
int *two = 4;
double *sum = one * two;
Thanks
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 of all, I’m pretty sure you mean
With the asterisk sign you create a pointer to a double.
So try this:
This should work.
If you meant to use pointers, have a look at @JAB’s answer.