输入:scanf,注意scanf的指示符不加@
#import <Foundation/Foundation.h> #import "MyFirstClass.h" int main(int argc, const char * argv[]) { @autoreleasepool { NSLog(@"输入:"); int c; scanf("%d", &c); NSLog(@"%d", c); return 0; } return 0; }
输出:NSLog,可以不加修饰符。
2024-01-08 12:46:04
输入:scanf,注意scanf的指示符不加@
#import <Foundation/Foundation.h> #import "MyFirstClass.h" int main(int argc, const char * argv[]) { @autoreleasepool { NSLog(@"输入:"); int c; scanf("%d", &c); NSLog(@"%d", c); return 0; } return 0; }
输出:NSLog,可以不加修饰符。