formal_protocol-6.m
来自「linux下编程用 编译软件」· M 代码 · 共 26 行
M
26 行
/* Contributed by Nicola Pero - Fri Mar 9 21:35:47 CET 2001 */#include <objc/objc.h>#include <objc/Protocol.h>/* Test defining a protocol, and accessing it using @protocol */@protocol Evaluating- (int) importance;@end/* Without a class adopting the protocol - this doesn't work with gcc-2.95.2 as well */int main (void){ Protocol *protocol = @protocol (Evaluating); if (strcmp ([protocol name], "Evaluating")) { abort (); } return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?