Language: C++

#include <iostream>
 
int main(){
  int N;
  std::cin >> N;
  std::vector<std::string> v;
  std::cin >> v;
  std::set<std::string> set;
  std::vector<std::string> result;
  for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
  {
      if (set.insert(*it).second)
          result.push_back(*it);
  }
  std::cout << result.length() << std::endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'vector' is not a member of 'std'
    6 |   std::vector<std::string> v;
      |        ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:6:26: error: expected primary-expression before '>' token
    6 |   std::vector<std::string> v;
      |                          ^
a.cc:6:28: error: 'v' was not declared in this scope
    6 |   std::vector<std::string> v;
      |                            ^
a.cc:8:8: error: 'set' is not a member of 'std'
    8 |   std::set<std::string> set;
      |        ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 | #include <iostream>
  +++ |+#include <set>
    2 | 
a.cc:8:23: error: expected primary-expression before '>' token
    8 |   std::set<std::string> set;
      |                       ^
a.cc:8:25: error: 'set' was not declared in this scope; did you mean 'tzset'?
    8 |   std::set<std::string> set;
      |                         ^~~
      |                         tzset
a.cc:9:8: error: 'vector' is not a member of 'std'
    9 |   std::vector<std::string> result;
      |        ^~~~~~
a.cc:9:8: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:9:26: error: expected primary-expression before '>' token
    9 |   std::vector<std::string> result;
      |                          ^
a.cc:9:28: error: 'result' was not declared in this scope
    9 |   std::vector<std::string> result;
      |                            ^~~~~~
a.cc:10:13: error: 'vector' is not a member of 'std'
   10 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |             ^~~~~~
a.cc:10:13: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:10:31: error: expected primary-expression before '>' token
   10 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |                               ^
a.cc:10:34: error: '::iterator' has not been declared; did you mean 'std::iterator'?
   10 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |                                  ^~~~~~~~
      |                                  std::iterator
In file included from /usr/include/c++/14/bits/stl_iterator_base_funcs.h:66,
                 from /usr/include/c++/14/string:47,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: 'std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
a.cc:10:59: error: 'it' was not declared in this scope; did you mean 'int'?
   10 |   for (std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it)
      |                                                           ^~
      |                                                           int
a.cc:15:45: error: expected '}' at end of input
   15 |   std::cout << result.length() << std::endl;
      |                                             ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^