Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){string s;
int s=0;
int sum=0;
for(int i=0;i<s.aize();i++){
    if(s.at(i)=="A"||s.at(i)=="C"||s.at(i)=="G"||s.at(i)=="T"){
        s++;
    }
    else{
        sum=max(s,sum);
        s=0;
    }
}
sum=max(sum,s);
cout<<sum<<endl;

    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: conflicting declaration 'int s'
    4 | int s=0;
      |     ^
a.cc:3:19: note: previous declaration as 'std::string s'
    3 | int main(){string s;
      |                   ^
a.cc:6:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'aize'; did you mean 'size'?
    6 | for(int i=0;i<s.aize();i++){
      |                 ^~~~
      |                 size
a.cc:7:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(s.at(i)=="A"||s.at(i)=="C"||s.at(i)=="G"||s.at(i)=="T"){
      |        ~~~~~~~^~~~~
a.cc:7:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(s.at(i)=="A"||s.at(i)=="C"||s.at(i)=="G"||s.at(i)=="T"){
      |                      ~~~~~~~^~~~~
a.cc:7:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(s.at(i)=="A"||s.at(i)=="C"||s.at(i)=="G"||s.at(i)=="T"){
      |                                    ~~~~~~~^~~~~
a.cc:7:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(s.at(i)=="A"||s.at(i)=="C"||s.at(i)=="G"||s.at(i)=="T"){
      |                                                  ~~~~~~~^~~~~
a.cc:8:10: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
    8 |         s++;
      |         ~^~
a.cc:11:16: error: no matching function for call to 'max(std::string&, int&)'
   11 |         sum=max(s,sum);
      |             ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:11:16: note:   deduced conflicting types for parameter 'const _Tp' ('std::__cxx11::basic_string<char>' and 'int')
   11 |         sum=max(s,sum);
      |             ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:11:16: note:   'std::__cxx11::basic_string<char>' is not derived from 'std::initializer_list<_Tp>'
   11 |         sum=max(s,sum);
      |             ~~~^~~~~~~
a.cc:12:11: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   12 |         s=0;
      |           ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  817 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  828 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  840 |       operator=(_CharT __c)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  858 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
a.cc:15:8: error: no matching function for call to 'max(int&, std::string&)'
   15 | sum=max(sum,s);
      |     ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:15:8: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   15 | sum=max(sum,s);
      |     ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:15:8: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 | sum=max(sum,s);
      |     ~~~^~~~~~~