标签:
//创建新类型
typedef struct { int age; char name[20];//最大字节为 20 }Student;
Student value2 = {1,*strcpy(value2.name, "证书")}; /* 把字符串拷贝到 char 里面去 strcpy(value2.name, "证书"); */ // char 转 NSString NSString *str = [NSString stringWithUTF8String:value2.name]; NSLog(@"%d---%@",value2.age,str);
标签:
原文地址:http://www.cnblogs.com/asamu/p/5791282.html