typedef语句

作者:追风剑情 发布于:2019-2-25 13:40 分类:Objective-C

示例

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        typedef int Counter;
        typedef NSNumber *NumberObject;
        
        Counter j; //等价于int j;
        NumberObject n; //等价于NSNumber *n;
        
        typedef enum { east, west, south, norh } Direction;
        
        Direction step1, step2;
        
        
    }
    return 0;
}

标签: Objective-C

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号