Language: C++

#include <cmath>
#include <vector>
#include <algorithm>
#include <iostream>
 
using namespace std;

//double???2?¬????????????????
struct vec{
    long double x,y;
    //eps??????????????´???????????¨
    inline double add(double a, double b){
        return abs(a+b)<(1e-10)*(abs(a)+abs(b)) ? 0.0 : a+b;
    }
    vec operator-(vec b){
        return vec(add(x,-b.x),add(y,-b.y));
    }
    vec operator+(vec b){
        return vec(add(x,b.x),add(y,b.y));
    }
    vec operator*(long double d){
        return vec(x*d,y*d);
    }
    bool operator==(vec b){
        return x==b.x&&y==b.y;
    }
    bool operator!=(vec b){
        return x!=b.x||y!=b.y;
    }
    bool operator<(const vec&r) const{
    return this->x==r.x?this->y<r.y:this->x<r.x;
    }
    long double dot(vec v){//??????
        return add(x*v.x,y*v.y);
    }
    long double cross(vec v){//??????
        return add(x*v.y,-y*v.x);
    }
    long double norm(){//?????????
        return hypot(x,y);
    }
};

//??????
vector<vec> convex_hull(vector<vec>& V){
    vector<vec> C;
    sort(V.begin(),V.end(),[](const vec& a, const vec& b){return a.y==b.y ? a.x < b.x : a.y< b.y;});
    //?????´
    for(int i=0; i<V.size(); i++){
        vec v = V[i];
        while(C.size()>=2&&(v-C[C.size()-2]).cross(C.back()-C[C.size()-2])>=0) C.pop_back();
        C.push_back(v);
    }
    //?????´
    for(int i=V.size()-2; i>=0; i--){
        vec v = V[i];
        while(C.size()>=2&&(v-C[C.size()-2]).cross(C.back()-C[C.size()-2])>=0) C.pop_back();
        C.push_back(v);
    }
    C.pop_back();
    return C;
}
 
int main(){
    int n;
    cin >> n;
    vec v;
    vector<vec> V,C;
    while(n--){
        cin >> v.x >> v.y;
        V.push_back(v);
    }
    C=convex_hull(V);
    cout << C.size() << endl;
    for(auto& i : C) cout << i.x << " " << i.y << endl;
    return 0;
}

Compiler output:
a.cc: In member function 'vec vec::operator-(vec)':
a.cc:16:43: error: no matching function for call to 'vec::vec(double, double)'
   16 |         return vec(add(x,-b.x),add(y,-b.y));
      |                                           ^
a.cc:9:8: note: candidate: 'vec::vec()'
    9 | struct vec{
      |        ^~~
a.cc:9:8: note:   candidate expects 0 arguments, 2 provided
a.cc:9:8: note: candidate: 'constexpr vec::vec(const vec&)'
a.cc:9:8: note:   candidate expects 1 argument, 2 provided
a.cc:9:8: note: candidate: 'constexpr vec::vec(vec&&)'
a.cc:9:8: note:   candidate expects 1 argument, 2 provided
a.cc: In member function 'vec vec::operator+(vec)':
a.cc:19:41: error: no matching function for call to 'vec::vec(double, double)'
   19 |         return vec(add(x,b.x),add(y,b.y));
      |                                         ^
a.cc:9:8: note: candidate: 'vec::vec()'
    9 | struct vec{
      |        ^~~
a.cc:9:8: note:   candidate expects 0 arguments, 2 provided
a.cc:9:8: note: candidate: 'constexpr vec::vec(const vec&)'
a.cc:9:8: note:   candidate expects 1 argument, 2 provided
a.cc:9:8: note: candidate: 'constexpr vec::vec(vec&&)'
a.cc:9:8: note:   candidate expects 1 argument, 2 provided
a.cc: In member function 'vec vec::operator*(long double)':
a.cc:22:27: error: no matching function for call to 'vec::vec(long double, long double)'
   22 |         return vec(x*d,y*d);
      |                           ^
a.cc:9:8: note: candidate: 'vec::vec()'
    9 | struct vec{
      |        ^~~
a.cc:9:8: note:   candidate expects 0 arguments, 2 provided
a.cc:9:8: note: candidate: 'constexpr vec::vec(const vec&)'
a.cc:9:8: note:   candidate expects 1 argument, 2 provided
a.cc:9:8: note: candidate: 'constexpr vec::vec(vec&&)'
a.cc:9:8: note:   candidate expects 1 argument, 2 provided