Language: C++

struct NumberTheoreticTransform {
    int mod;
    int root;

    NumberTheoreticTransform(int mod, int root) : mod(mod), root(root) {}

    int mul(int x, int y) {
        return int64_t(x) * y % mod;
    }

    int add(int x, int y) {
        return (x += y) >= mod ? x - mod : x;
    }

    int pow(int x, int y) {
        int res = 1;
        while (y > 0) {
            if (y & 1) res = mul(res, x);
            x = mul(x, x);
            y >>= 1;
        }
        return res;
    }

    int inv(int x) {
        return pow(x, mod - 2);
    }

    void ntt(std::vector<int> &a, bool rev = false) {
        int n = a.size();
        int h = 0;
        for (int i = 0; 1 << i < n; i++) h++;
        for (int i = 0; i < n; i++) {
            int j = 0;
            for (int k = 0; k < h; k++) j |= (i >> k & 1) << (h - 1 - k);
            if (i < j) std::swap(a[i], a[j]);
        }
        for (int i = 1; i < n; i *= 2) {
            int w = pow(root, (mod - 1) / (i * 2));
            if (rev) w = inv(w);
            for (int j = 0; j < n; j += i * 2) {
                int wn = 1;
                for (int k = 0; k < i; k++) {
                    int s = a[j + k + 0];
                    int t = mul(a[j + k + i], wn);
                    a[j + k + 0] = add(s, t);
                    a[j + k + i] = add(s, mod - t);
                    wn = mul(wn, w);
                }
            }
        }
        int v = inv(n);
        if (rev) for (int i = 0; i < n; i++) a[i] = mul(a[i], v);
    }

    std::vector<int> mul(std::vector<int> a, std::vector<int> b) {
        int s = a.size() + b.size() - 1;
        int t = 1;
        while (t < s) t *= 2;
        a.resize(t);
        b.resize(t);
        ntt(a);
        ntt(b);
        for (int i = 0; i < t; i++) {
            a[i] = mul(a[i], b[i]);
        }
        ntt(a, true);
        a.resize(s);
        return a;
    }
};

Compiler output:
a.cc:29:14: error: 'std::vector' has not been declared
   29 |     void ntt(std::vector<int> &a, bool rev = false) {
      |              ^~~
a.cc:29:25: error: expected ',' or '...' before '<' token
   29 |     void ntt(std::vector<int> &a, bool rev = false) {
      |                         ^
a.cc:56:10: error: 'vector' in namespace 'std' does not name a template type
   56 |     std::vector<int> mul(std::vector<int> a, std::vector<int> b) {
      |          ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | struct NumberTheoreticTransform {
a.cc: In member function 'int NumberTheoreticTransform::mul(int, int)':
a.cc:8:16: error: 'int64_t' was not declared in this scope
    8 |         return int64_t(x) * y % mod;
      |                ^~~~~~~
a.cc:1:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | struct NumberTheoreticTransform {
a.cc: In member function 'void NumberTheoreticTransform::ntt(int)':
a.cc:30:17: error: 'a' was not declared in this scope
   30 |         int n = a.size();
      |                 ^
a.cc:36:29: error: 'swap' is not a member of 'std'
   36 |             if (i < j) std::swap(a[i], a[j]);
      |                             ^~~~
a.cc:40:17: error: 'rev' was not declared in this scope
   40 |             if (rev) w = inv(w);
      |                 ^~~
a.cc:53:13: error: 'rev' was not declared in this scope
   53 |         if (rev) for (int i = 0; i < n; i++) a[i] = mul(a[i], v);
      |             ^~~