📄 encode-8.mm
字号:
/* Test if the Objective-C @encode machinery distinguishes between 'BOOL *' (which should be encoded as '^c') and 'char *' (which should be encoded as '*'). *//* Contributed by Ziemowit Laski <zlaski@apple.com>. *//* { dg-options "-lobjc" } *//* { dg-do run } */#include <string.h> #include <stdlib.h>#include <objc/objc.h>int main(void) { const char *BOOL_ptr = @encode(BOOL *); const char *char_ptr = @encode(char *); if(strcmp(BOOL_ptr, "^c")) abort(); if(strcmp(char_ptr, "*")) abort(); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -