Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str1, str2, str3, str4, str5;
  str1 = std::string(A);
  str2 = std::string(T);
  str3 = std::string(G);
  str4 = std::string(C);
  int X;
  X = 0;
  cin >> str5;
  for (int i = 1; i < str5.size + 1; i++) {
   if (str5.at(i) = str1) {
   X++;
}
   if (str5.at(i) = str2) {
   X++;
} 
   if (str5.at(i) = str3) {
   X++;
}
   if (str5.at(i) = str4) {
   X++;
}
}
  cout << str5.size - X << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: 'A' was not declared in this scope
    6 |   str1 = std::string(A);
      |                      ^
a.cc:7:22: error: 'T' was not declared in this scope
    7 |   str2 = std::string(T);
      |                      ^
a.cc:8:22: error: 'G' was not declared in this scope
    8 |   str3 = std::string(G);
      |                      ^
a.cc:9:22: error: 'C' was not declared in this scope
    9 |   str4 = std::string(C);
      |                      ^
a.cc:13:28: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 |   for (int i = 1; i < str5.size + 1; i++) {
      |                       ~~~~~^~~~
      |                                ()
a.cc:14:21: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   14 |    if (str5.at(i) = str1) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:17:21: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   17 |    if (str5.at(i) = str2) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:20:21: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   20 |    if (str5.at(i) = str3) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:23:21: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   23 |    if (str5.at(i) = str4) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:27:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   27 |   cout << str5.size - X << endl;
      |           ~~~~~^~~~
      |                    ()