#include <stdio.h> /* declare the Point type */ typedef struct { int x, y; } Point; /* function to print a Point */ void printPoint( Point *p ) { printf("(%d, %d)\n", p->x, p->y ); } int main(int argc, char *argv[]) { /* declare and initialize a Point */ Point point = {123, 456}; /* print values */ printPoint( &point ); system("pause"); return 0; }
Comments: