int a = 5;
int * pa;//因此所有obj c裡面所有的物件,只要他是存放記憶體位置,都需要用指標型態去寫
pa = &a;//放的是一個記憶體位置
Struct是型別,也就是class(類別)
struct Date{
int day;
int month;
int year;
void ( * formatedDate ) (struct Date date);
}
void formatedFunction(struct Date date){
printf("The day is %d, %d/%d",date.year, date.month, date.day);
}
struct Date date = {3,10,1970};
today.formatedDate = formatedFunction;
today.formatedDate(today);