Language: C++

#define MAX_INPUT 100000
/*??????????±???????????????°??????*/
typedef struct point_t{
  int x;
  int y;
} ;

int compare(const void*, const void*);
static int ccw(point_t*, point_t*, point_t*);
void convex_hull(point_t*, int, point_t***, int*);

int main(void)
{
    int npoints = 0; 
    int i;
    point_t aPoints[MAX_INPUT];
    point_t*** outhull = NULL;
    int h;


/*??§?¨??????????????????????*/
    for(i = 0; i < MAX_INPUT; i++){
        aPoints[i].x = NULL;
        aPoints[i].y = NULL;
    }


    scanf("%d", &npoints);
    for (i = 0; i < npoints; i++){
        scanf("%d %d", &aPoints[i].x, &aPoints[i].y);
    }
/*y??§?¨???§?????????*/
    qsort(&aPoints, npoints, sizeof(point_t), compare);
/*??????????±???????*/
 
    convex_hull(aPoints, npoints, outhull, &h);

    printf("%d\n", &h);
    for(i = 0; i < h -1; i++){
         printf("%d %d\n", *(outhull+ 2 * i * sizeof(point_t)), *(outhull+ 2 * i * sizeof(point_t) + 2));
    }

    return 0;
}
/* ????????¢??° */
int compare(const void* c1, const void* c2)
{
    point_t t1 = *(point_t *)c1;
    point_t t2 = *(point_t *)c2;

    if(t1.y < t2.y){            /*y??§?¨???§?????????*/
        return -1;
    }else if(t1.y > t2.y){
        return 1;
    }else return 0;
}
/* Three points are a counter-clockwise turn if ccw > 0, clockwise if
 * ccw < 0, and collinear if ccw = 0 because ccw is a determinant that
 * gives the signed area of the triangle formed by p1, p2 and p3.
 */
static int ccw(point_t* p1, point_t* p2, point_t* p3)
{
    return (p2->x - p1->x)*(p3->y - p1->y) - (p2->y - p1->y)*(p3->x - p1->x);
}

/* Returns a list of points on the convex hull in counter-clockwise order.
 * Note: the last point in the returned list is the same as the first one.
 */
void convex_hull(point_t* points, int npoints, point_t*** out_hull, int* out_hullsize)
{
    point_t** hull;
    int i, t, k = 0;

    hull = *out_hull;

/* lower hull */
    for (i = 0; i < npoints; ++i) {
      while (k >= 2 && ccw(hull[k-2], hull[k-1], &points[i]) <= 0) --k;
      hull[k++] = &points[i];
    }

/* upper hull */
    for (i = npoints-2, t = k+1; i >= 0; --i) {
      while (k >= t && ccw(hull[k-2], hull[k-1], &points[i]) <= 0) --k;
      hull[k++] = &points[i];
    }

    *out_hull = hull;
    *out_hullsize = k;
}

Compiler output:
a.cc:3:1: warning: 'typedef' was ignored in this declaration
    3 | typedef struct point_t{
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:17:26: error: 'NULL' was not declared in this scope
   17 |     point_t*** outhull = NULL;
      |                          ^~~~
a.cc:1:1: note: 'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | #define MAX_INPUT 100000
a.cc:28:5: error: 'scanf' was not declared in this scope
   28 |     scanf("%d", &npoints);
      |     ^~~~~
a.cc:33:5: error: 'qsort' was not declared in this scope
   33 |     qsort(&aPoints, npoints, sizeof(point_t), compare);
      |     ^~~~~
a.cc:38:5: error: 'printf' was not declared in this scope
   38 |     printf("%d\n", &h);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define MAX_INPUT 100000