Language: C++

#include<algorithm>
#include<iostream>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<queue>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef stack<int> SI;
typedef queue<int> QI;
typedef list<int> LI;
typedef pair<int,int> PII;
typedef long long LL;

#define d(x)  cout<<#x<<" = "<<(x)<<endl;
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EMP empty()
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define REACH(i,c) for(typeof((c).rbegin()) i=(c).rbegin(); i!=(c).rend(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c,n) sort(c,c+n)
#define VSORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define DFOR(i,b,a) for(int i=(b)-1;i>=(a);--i)
#define DREP(i,n) DFOR(i,n,0)
#define INF 1000000000

const double EPS = 1e-10;
const double PI  = acos(-1.0);
////////////////////////////////////////////////
struct vtr{double x;double y;};


double absvtr(vtr a)
{
	return sqrt(a.x*a.x+a.y*a.y);
}
double dotp(vtr a,vtr b)
{
	return a.x*b.x+a.y*b.y;
}
double abscrossp(vtr a,vtr b)
{
	return a.x*b.y-a.y*b.x;
}
double plusvtr(vtr a,vtr b)
{
	vtr c;
	c.x=a.x+b.x;
	c.y=a.y+b.y;
	return c;
}
double minusvtr(vtr a,vtr b)
{
	vtr c;
	c.x=a.x-b.x;
	c.y=a.y-b.y;
	return c;
}

int main()
{
	int n;cin>>n;
	vtr p[4];
	REP(i,n)
	{
		REP(j,4)cin>>p[j].x>>p[j].y;
		double a,b,c,d;
		a=absvtr( crossp( minusvtr(p[1],p[0]), minusvtr(p[2],p[0]) ) ) / absvtr( minusvtr(p[1],p[0]) );
		b=absvtr( crossp( minusvtr(p[1],p[0]), minusvtr(p[3],p[0]) ) ) / absvtr( minusvtr(p[1],p[0]) );
		c=absvtr( crossp( minusvtr(p[3],p[2]), minusvtr(p[1],p[2]) ) ) / absvtr( minusvtr(p[3],p[2]) );
		d=absvtr( crossp( minusvtr(p[3],p[2]), minusvtr(p[0],p[2]) ) ) / absvtr( minusvtr(p[3],p[2]) );
		cout<<min(min(a,b),min(c,d));
	}
	return 0;
}

Compiler output:
a.cc: In function 'double plusvtr(vtr, vtr)':
a.cc:67:16: error: cannot convert 'vtr' to 'double' in return
   67 |         return c;
      |                ^
      |                |
      |                vtr
a.cc: In function 'double minusvtr(vtr, vtr)':
a.cc:74:16: error: cannot convert 'vtr' to 'double' in return
   74 |         return c;
      |                ^
      |                |
      |                vtr
a.cc: In function 'int main()':
a.cc:85:27: error: 'crossp' was not declared in this scope
   85 |                 a=absvtr( crossp( minusvtr(p[1],p[0]), minusvtr(p[2],p[0]) ) ) / absvtr( minusvtr(p[1],p[0]) );
      |                           ^~~~~~
a.cc:85:98: error: could not convert 'minusvtr(p[1], p[0])' from 'double' to 'vtr'
   85 |                 a=absvtr( crossp( minusvtr(p[1],p[0]), minusvtr(p[2],p[0]) ) ) / absvtr( minusvtr(p[1],p[0]) );
      |                                                                                          ~~~~~~~~^~~~~~~~~~~
      |                                                                                                  |
      |                                                                                                  double
a.cc:86:98: error: could not convert 'minusvtr(p[1], p[0])' from 'double' to 'vtr'
   86 |                 b=absvtr( crossp( minusvtr(p[1],p[0]), minusvtr(p[3],p[0]) ) ) / absvtr( minusvtr(p[1],p[0]) );
      |                                                                                          ~~~~~~~~^~~~~~~~~~~
      |                                                                                                  |
      |                                                                                                  double
a.cc:87:98: error: could not convert 'minusvtr(p[3], p[2])' from 'double' to 'vtr'
   87 |                 c=absvtr( crossp( minusvtr(p[3],p[2]), minusvtr(p[1],p[2]) ) ) / absvtr( minusvtr(p[3],p[2]) );
      |                                                                                          ~~~~~~~~^~~~~~~~~~~
      |                                                                                                  |
      |                                                                                                  double
a.cc:88:98: error: could not convert 'minusvtr(p[3], p[2])' from 'double' to 'vtr'
   88 |                 d=absvtr( crossp( minusvtr(p[3],p[2]), minusvtr(p[0],p[2]) ) ) / absvtr( minusvtr(p[3],p[2]) );
      |                                                                                          ~~~~~~~~^~~~~~~~~~~
      |                                                                                                  |
      |                                                                                                  double