Converting an NSString* to char?
How can I convert a NSString* into a char?
EDIT: Thanks to Vladimir for getting me t开发者_运维技巧here!
NSString *myString = @"HelloWorld";
const char *stringAsChar = [myString cStringUsingEncoding:[NSString defaultCStringEncoding]];
Hope this helps someone in the future!
Simple to transfer
const char *cfilename=[stringobject UTF8String];
精彩评论