Language: C++

// #include <bits/stdc++.h>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

using namespace std;


int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    rep(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

template <typename T>
void output(T a, int precision) {
    if(precision > 0){
        cout << setprecision(precision)  << a << "\n";
    }
    else{
        cout << a << "\n";
    }
}

int main(int argc, const char * argv[]) {
    
    // source code
  string s,t;
  cin >> s >> t;
  int count = 0;
  rep(i,3)
  {
    if(s[0] == t[0])
    {
      count++;
    }
  }
  
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int inputValue()':
a.cc:12:5: error: 'cin' was not declared in this scope
   12 |     cin >> a;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | // #include <bits/stdc++.h>
a.cc: In function 'void inputArray(int*, int)':
a.cc:18:9: error: 'cin' was not declared in this scope
   18 |         cin >> p[i];
      |         ^~~
a.cc:18:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: At global scope:
a.cc:22:6: error: variable or field 'inputVector' declared void
   22 | void inputVector(vector<int> * p, int a){
      |      ^~~~~~~~~~~
a.cc:22:18: error: 'vector' was not declared in this scope
   22 | void inputVector(vector<int> * p, int a){
      |                  ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | // #include <bits/stdc++.h>
a.cc:22:25: error: expected primary-expression before 'int'
   22 | void inputVector(vector<int> * p, int a){
      |                         ^~~
a.cc:22:35: error: expected primary-expression before 'int'
   22 | void inputVector(vector<int> * p, int a){
      |                                   ^~~
a.cc: In function 'void output(T, int)':
a.cc:33:9: error: 'cout' was not declared in this scope
   33 |         cout << setprecision(precision)  << a << "\n";
      |         ^~~~
a.cc:33:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:17: error: there are no arguments to 'setprecision' that depend on a template parameter, so a declaration of 'setprecision' must be available [-fpermissive]
   33 |         cout << setprecision(precision)  << a << "\n";
      |                 ^~~~~~~~~~~~
a.cc:33:17: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
a.cc:36:9: error: 'cout' was not declared in this scope
   36 |         cout << a << "\n";
      |         ^~~~
a.cc:36:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: In function 'int main(int, const char**)':
a.cc:43:3: error: 'string' was not declared in this scope
   43 |   string s,t;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | // #include <bits/stdc++.h>
a.cc:44:3: error: 'cin' was not declared in this scope
   44 |   cin >> s >> t;
      |   ^~~
a.cc:44:3: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:44:10: error: 's' was not declared in this scope
   44 |   cin >> s >> t;
      |          ^
a.cc:44:15: error: 't' was not declared in this scope
   44 |   cin >> s >> t;
      |               ^
a.cc:54:3: error: 'cout' was not declared in this scope
   54 |   cout << count << endl;
      |   ^~~~
a.cc:54:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:54:20: error: 'endl' was not declared in this scope
   54 |   cout << count << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | // #include <bits/stdc++.h>