Skip to content

Instantly share code, notes, and snippets.

@7gano
Last active December 15, 2015 08:38
Show Gist options
  • Save 7gano/5231806 to your computer and use it in GitHub Desktop.
Save 7gano/5231806 to your computer and use it in GitHub Desktop.
#include <CoreFoundation/CoreFoundation.h>
int main(int argc, const char * argv[])
{
CFStringRef stringRef;
stringRef = CFSTR("Hello, World!\n");
CFStringRef fruits[] = {CFSTR("Apple"), CFSTR("banana")};
CFArrayRef arrayRef;
arrayRef = CFArrayCreate(kCFAllocatorDefault,
(const void **)fruits,
2,
NULL);
CFShow(stringRef);
CFShow(arrayRef);
CFRelease(arrayRef);
return 0;
}
実行結果
Hello, World!
<CFArray 0x100107050 [0x7fff7e3cb110]>{type = immutable, count = 2, values = (
0 : <0x100001060>
1 : <0x100001080>
)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment