Language: C++

#include<iostream>
#include<string>
#include<vector>
 
int main(){
    
  int string_length;
  int string_num;
  std::cin >> string_length >> string_num;
 
  std::vector<std::string> strings;
  
  int i;
  for(i=0; i < string_num; i++){
    std::string input;
    std::cin >> input;
    strings.push_back(input);
  }
  
  std::string result;
  
  while(strings.size > 0){
    std::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:22:17: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
   22 |   while(strings.size > 0){
      |         ~~~~~~~~^~~~
      |                     ()
a.cc:29:24: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
   29 |     for(i=0; i<strings.size; i++){
      |                ~~~~~~~~^~~~
      |                            ()
a.cc:36:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int&)'
   36 |         strings.erase(minimum_pos);
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/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:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/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:7: note:   candidate expects 2 arguments, 1 provided