Language: C++

struct mint {
	ll x;
	mint(ll x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod)x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod)x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a)const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a)const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t)const {
		if (!t)return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1)a *= *this;
		return a;
	}
 
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};

Compiler output:
a.cc:2:9: error: 'll' does not name a type
    2 |         ll x;
      |         ^~
a.cc:3:16: error: expected ')' before 'x'
    3 |         mint(ll x = 0) :x((x% mod + mod) % mod) {}
      |             ~  ^~
      |                )
a.cc:29:18: error: 'll' has not been declared
   29 |         mint pow(ll t)const {
      |                  ^~
a.cc: In member function 'mint mint::operator-() const':
a.cc:4:47: error: 'x' was not declared in this scope
    4 |         mint operator-() const { return mint(-x); }
      |                                               ^
a.cc: In member function 'mint& mint::operator+=(mint)':
a.cc:6:22: error: 'x' was not declared in this scope
    6 |                 if ((x += a.x) >= mod)x -= mod;
      |                      ^
a.cc:6:29: error: 'const struct mint' has no member named 'x'
    6 |                 if ((x += a.x) >= mod)x -= mod;
      |                             ^
a.cc:6:35: error: 'mod' was not declared in this scope
    6 |                 if ((x += a.x) >= mod)x -= mod;
      |                                   ^~~
a.cc: In member function 'mint& mint::operator-=(mint)':
a.cc:10:22: error: 'x' was not declared in this scope
   10 |                 if ((x += mod - a.x) >= mod)x -= mod;
      |                      ^
a.cc:10:27: error: 'mod' was not declared in this scope
   10 |                 if ((x += mod - a.x) >= mod)x -= mod;
      |                           ^~~
a.cc:10:35: error: 'const struct mint' has no member named 'x'
   10 |                 if ((x += mod - a.x) >= mod)x -= mod;
      |                                   ^
a.cc: In member function 'mint& mint::operator*=(mint)':
a.cc:14:18: error: 'x' was not declared in this scope
   14 |                 (x *= a.x) %= mod;
      |                  ^
a.cc:14:25: error: 'const struct mint' has no member named 'x'
   14 |                 (x *= a.x) %= mod;
      |                         ^
a.cc:14:31: error: 'mod' was not declared in this scope
   14 |                 (x *= a.x) %= mod;
      |                               ^~~
a.cc: In member function 'mint mint::pow(int) const':
a.cc:30:31: error: could not convert '1' from 'int' to 'mint'
   30 |                 if (!t)return 1;
      |                               ^
      |                               |
      |                               int
a.cc: In member function 'mint mint::inv() const':
a.cc:38:28: error: 'mod' was not declared in this scope
   38 |                 return pow(mod - 2);
      |                            ^~~