i.e
#include <stdlib.h>
#include <stdio.h>
void doublePointerPractice();
struct people{
char name;
int id;
};
typedef struct people * PeoplePtr;
int main(void){
doublePointerPractice();
return 0;
}
void doublePointerPractice(){
PeoplePtr peoplePtr = (PeoplePtr)malloc(sizeof(PeoplePtr));
peoplePtr->id = 12345;
PeoplePtr * ptrPtr = &peoplePtr;
printf("%d" , (*ptrPtr)->id );
}
沒有留言:
張貼留言