1

What is the proper way of assigning the string in ZNstartTime to args[0]? Thank you.

char *args[10];

- (void)print:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {

    NSString *ZNstartTime =  [arguments objectAtIndex:1];  //contents is "string"     
    NSString *ZNlengthTime = [arguments objectAtIndex:2];  //contents is "string" 


       args[0] = ZNstartTime //<-- returning incompatible error

}
1
  • Any reason you aren't using an NSMutableArray? Commented Sep 12, 2011 at 1:21

1 Answer 1

2

NSString* has to be converted to a char* using [ZNstartTime cStringUsingEncoding:ASCIIEncoding]

Sign up to request clarification or add additional context in comments.

2 Comments

@cube - try NSASCIIStringEncoding
When I do this I get ASCIIEncoding undeclared.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.