Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,re;cin >> N;
  
  vector<string>  str(N);
  for (i=0,i++,i<N){
    cin >> str.at(i);
  }
  int new_str = unique(str.begin() ,str.end() )
  str.erase(new_str,str.end())
  re = str.size()
  cout >> re >> endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i=0,i++,i<N){
      |        ^
a.cc:11:23: error: cannot convert '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'int' in initialization
   11 |   int new_str = unique(str.begin() ,str.end() )
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >
a.cc:11:48: error: expected ';' before 'str'
   11 |   int new_str = unique(str.begin() ,str.end() )
      |                                                ^
      |                                                ;
   12 |   str.erase(new_str,str.end())
      |   ~~~                                           
a.cc:12:12: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int&, std::vector<std::__cxx11::basic_string<char> >::iterator)'
   12 |   str.erase(new_str,str.end())
      |   ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |             ~~~~~~~~~~~~~~~^~~~~~~
a.cc:12:31: error: expected ')' before 're'
   12 |   str.erase(new_str,str.end())
      |                               ^
      |                               )
   13 |   re = str.size()
      |   ~~                           
a.cc:8:7: note: to match this '('
    8 |   for (i=0,i++,i<N){
      |       ^
a.cc:13:18: error: expected ';' before 'cout'
   13 |   re = str.size()
      |                  ^
      |                  ;
   14 |   cout >> re >> endl;
      |   ~~~~