Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str1, str2, str3, str4, str5;
  char A;
  char T;
  char G;
  char C;
  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:10:22: error: expected primary-expression before 'A'
   10 |   str1 = std::string A;
      |                      ^
a.cc:11:22: error: expected primary-expression before 'T'
   11 |   str2 = std::string T;
      |                      ^
a.cc:12:22: error: expected primary-expression before 'G'
   12 |   str3 = std::string G;
      |                      ^
a.cc:13:22: error: expected primary-expression before 'C'
   13 |   str4 = std::string C;
      |                      ^
a.cc:17: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 '()' ?)
   17 |   for (int i = 1; i < str5.size + 1; i++) {
      |                       ~~~~~^~~~
      |                                ()
a.cc:18: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
   18 |    if (str5.at(i) = str1) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:21: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
   21 |    if (str5.at(i) = str2) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:24: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
   24 |    if (str5.at(i) = str3) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:27: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
   27 |    if (str5.at(i) = str4) {
      |                     ^~~~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:31: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 '()' ?)
   31 |   cout << str5.size - X << endl;
      |           ~~~~~^~~~
      |                    ()