I need to pass a string as an argument but I dont know how..Help?
-(void)sendSMS: (int) number:(NSString)carrier;
That says objects cant be used as parameters.
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.
You should be using NSString* (notice the *) – what you want to be passing around is a pointer to an NSString object.
Try this (this naming convention is also much more Objective-c like):
Side Note, I’d recommend having your number variable be an NSString* as well, 10 digit numbers being what you’re probably passing for a phone number and all, but I really don’t know anything about what you’re implementing and how.