Show.h
#ifndef __ocday01__show__#define __ocday01__show__#include <stdio.h>extern void Testtshow (); #endif/* Defined (_ _OCDAY01__SHOW__) */
Show.c
#include "Show.h" void Testtshow () { printf ("I am a function in the famous C file, who dares to invoke? "). haha \ n ");}
MAIN.M (OC source file)
6-"Understanding" access to OC source files, functions in C source files #import <foundation/foundation.h>//Introduce the header file of Show #import "Show.h" void test1 () { printf ("Hello I am the C language function I put in the OC original file, do you dare to call me all at once ? " Ha ha \ n ");} int main (int argc, const char * argv[]) { @autoreleasepool { //oc) is feasible to access the C language function written in the OC source file. Test1 (); It is possible to access the C function written in the C file in OC. Testtshow (); } return 0;}
Oc-03-oc access to the OC source file, C source file functions