1 #include <stdio.h> 2 3 struct Payload { 4 char* title; 5 char* data; 6 }; 7 8 char* extractData(struct Payload *payload); 9 10 int main(int argc, char const *argv[]) 11 { 12 struct Payload payload; 13 14 payload.title = "content-type"; 15 payload.data = "text/html"; 16 17 char* data = extractData(&payload); 18 printf("%s ", data); 19 20 return 0; 21 } 22 23 24 char* extractData(struct Payload *payload) { 25 if (NULL == payload) { 26 return 0; 27 } 28 29 return payload->data; 30 }