Language: C++

#include<iostream>
#include<string>
#include<vector>
 
int main(){
    
  int string_length;
  int string_num;
  std::cin >> string_length >> string_num;
 
  std::vector<string> strings;
  
  int i;
  for(i=0; i < string_num; i++){
    string input;
    cin >> input;
    strings.push_back(input);
  }
  
  
  string result;
  
  while(strings.size > 0){
    string minimum;
    int minimum_pos;
    
	minimum = strings[0];
    minimum_pos = 0;
    
    for(i=0; i<strings.size; i++){
      if(strings[i].compare(minimum) < 0){
        minimum = strings[i];
        minimum_pos = i;
      }
    }
    result = result + minimum;
  	strings.erase(minimum_pos);
  }
  
  std::cout << result;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'string' was not declared in this scope
   11 |   std::vector<string> strings;
      |               ^~~~~~
a.cc:11:15: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:11:21: error: template argument 1 is invalid
   11 |   std::vector<string> strings;
      |                     ^
a.cc:11:21: error: template argument 2 is invalid
a.cc:15:11: error: expected ';' before 'input'
   15 |     string input;
      |           ^~~~~~
      |           ;
a.cc:16:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   16 |     cin >> input;
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:12: error: 'input' was not declared in this scope; did you mean 'int'?
   16 |     cin >> input;
      |            ^~~~~
      |            int
a.cc:17:13: error: request for member 'push_back' in 'strings', which is of non-class type 'int'
   17 |     strings.push_back(input);
      |             ^~~~~~~~~
a.cc:21:9: error: expected ';' before 'result'
   21 |   string result;
      |         ^~~~~~~
      |         ;
a.cc:23:17: error: request for member 'size' in 'strings', which is of non-class type 'int'
   23 |   while(strings.size > 0){
      |                 ^~~~
a.cc:24:11: error: expected ';' before 'minimum'
   24 |     string minimum;
      |           ^~~~~~~~
      |           ;
a.cc:27:9: error: 'minimum' was not declared in this scope; did you mean 'minimum_pos'?
   27 |         minimum = strings[0];
      |         ^~~~~~~
      |         minimum_pos
a.cc:27:26: error: invalid types 'int[int]' for array subscript
   27 |         minimum = strings[0];
      |                          ^
a.cc:30:24: error: request for member 'size' in 'strings', which is of non-class type 'int'
   30 |     for(i=0; i<strings.size; i++){
      |                        ^~~~
a.cc:31:17: error: invalid types 'int[int]' for array subscript
   31 |       if(strings[i].compare(minimum) < 0){
      |                 ^
a.cc:32:26: error: invalid types 'int[int]' for array subscript
   32 |         minimum = strings[i];
      |                          ^
a.cc:36:5: error: 'result' was not declared in this scope
   36 |     result = result + minimum;
      |     ^~~~~~
a.cc:37:17: error: request for member 'erase' in 'strings', which is of non-class type 'int'
   37 |         strings.erase(minimum_pos);
      |                 ^~~~~
a.cc:40:16: error: 'result' was not declared in this scope
   40 |   std::cout << result;
      |                ^~~~~~