Vote count:
0
(void)enterInfo { NSLog(@"What is the first name?"); char cstring[40]; scanf("%s", cstring);
firstName = [NSString stringWithCString:cstring encoding:1]; // What is encoding:1 saying and what other formats are their and please clarify on those as well, Thanks.
}
- (void)printInfo { NSLog(@"First name: %@", firstName); }
asked 40 secs ago
what is encoding in [NSString stringWithCString: variable encoding:1]; or stringWithUTF8String
Aucun commentaire:
Enregistrer un commentaire