criyle/codenet-compile-errors huggingface dataset:
Language: Java

public class Main {
 public static void main(String[] args) {
 	Scanner sc = new Scanner(System.in);
   	String line = sc.nextLine();
    String[] arr = line.split("\\s");
    int n = Integer.parseInt(arr[0]);
    int l = Integer.parseInt(arr[1]);
   List<String> ss = new ArrayList<>();
   while(sc.hasNextLine()) {
     ss.add(sc.nextLine());
   }
   
   Collections.sort(ss);
   StringBuilder sb = new StringBuilder();
   for(String s : ss) {
    sb.append(s); 
   }
   
   return sb.toString();
 }
  
}

Compiler output:
Main.java:3: error: cannot find symbol
 	Scanner sc = new Scanner(System.in);
 	^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
 	Scanner sc = new Scanner(System.in);
 	                 ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
   List<String> ss = new ArrayList<>();
   ^
  symbol:   class List
  location: class Main
Main.java:8: error: cannot find symbol
   List<String> ss = new ArrayList<>();
                         ^
  symbol:   class ArrayList
  location: class Main
Main.java:13: error: cannot find symbol
   Collections.sort(ss);
   ^
  symbol:   variable Collections
  location: class Main
Main.java:19: error: incompatible types: unexpected return value
   return sb.toString();
                     ^
6 errors
Language: C++

n,l = map(int,input().split())
s=[]
for _ in range(n):
	s.append(input())
s.sort()
print(''.join(s))

Compiler output:
a.cc:6:7: error: empty character constant
    6 | print(''.join(s))
      |       ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n,l = map(int,input().split())
      | ^
Language: C++

#include<iostream>
#include<stdlib.h>
#include<string>
#include<string.h>

using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
char A[N][L],b,T[L*N];
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i+1])>0)
{b=A[i];A[i]=A[i+1];A[i+1]=b;}
for(int i=0;i<N;i++)
strcat(T,A[i]);
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: invalid conversion from 'char*' to 'char' [-fpermissive]
   15 | {b=A[i];A[i]=A[i+1];A[i+1]=b;}
      |    ~~~^
      |       |
      |       char*
a.cc:15:13: error: invalid array assignment
   15 | {b=A[i];A[i]=A[i+1];A[i+1]=b;}
      |         ~~~~^~~~~~~
a.cc:15:27: error: incompatible types in assignment of 'char' to 'char [L]'
   15 | {b=A[i];A[i]=A[i+1];A[i+1]=b;}
      |                     ~~~~~~^~
Language: C++

#include<iostream>
#include<stdlib.h>
#include<string>
#include<string.h>

using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
string A[N],b,T;
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i+1])>0)
{b=A[i];A[i]=A[i+1];A[i+1]=b;}
T=A[i];
for(i=1;i<N;i++)
T=T+A[i];
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   14 | if(strcmp(A[i],A[i+1])>0)
      |           ~~~^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:4:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:16:5: error: 'i' was not declared in this scope
   16 | T=A[i];
      |     ^
Language: C++

#include<iostream>
#include<stdlib.h>
#include<string>
using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
string A[N],b,T;
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i+1])>0)
{b=A[i];A[i]=A[i+1];A[i+1]=b;}
T=A[i];
for(i=1;i<N;i++)
T=T+A[i];
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: 'strcmp' was not declared in this scope
   12 | if(strcmp(A[i],A[i+1])>0)
      |    ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<stdlib.h>
  +++ |+#include <cstring>
    3 | #include<string>
a.cc:14:5: error: 'i' was not declared in this scope
   14 | T=A[i];
      |     ^
Language: C++

#include<iostream.h>
#include<stdlib.h>
#include<string>
using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
string A[N],b,T;
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i+1])>0)
{b=A[i];A[i]=A[i+1];A[i+1]=b;}
T=A[i];
for(i=1;i<N;i++)
T=T+A[i];
return 0;}


Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

# cook your dish here
s=input()
m=s.split()
n=int(s[0]);
l=int(s[2]);
list=[]
for i in range(n):
    st=input()
    list.append(st)
list.sort()
for i in list:
    print(i,end="")



Compiler output:
a.cc:1:3: error: invalid preprocessing directive #cook
    1 | # cook your dish here
      |   ^~~~
a.cc:2:1: error: 's' does not name a type
    2 | s=input()
      | ^
a.cc:5:1: error: 'l' does not name a type
    5 | l=int(s[2]);
      | ^
a.cc:6:1: error: 'list' does not name a type
    6 | list=[]
      | ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
    int N, L, i;
    cin >> N;
    cin >> L;
    vector<int> A(S, S+N);
    
    for (i=0; i<N; i++){
        cin >> A[i];
    }
    sort(A.begin(), A.end());

    for(i=0; i<N; i++){
        cout << A[i];
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'S' was not declared in this scope
   10 |     vector<int> A(S, S+N);
      |                   ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
    int N, L, i;
    cin >> N;
    cin >> L;
    vector<int> A(data, data+N);
    
    for (i=0; i<N; i++){
        cin >> A[i];
    }
    sort(A.begin(), A.end());

    for(i=0; i<N; i++){
        cout << A[i];
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   10 |     vector<int> A(data, data+N);
      |                         ~~~~^~
Language: C++

#include<iostream>
using namespace std;

int main() {
    int N, L, i;
    cin >> N;
    cin >> L;

    string S;
    for (i=0; i<N; i++){
        cin >> S[i];
    }
    sort(S.begin(), S.end));

    for(i=0; i<N; i++){
        cout << s[i];
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(S.begin(), S.end));
      |     ^~~~
      |     short
a.cc:16:17: error: 's' was not declared in this scope
   16 |         cout << s[i];
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main() {
    int N, L, i;
    cin >> N;
    cin >> L;

    steing S;
    for (i=0; i<N; i++){
        cin >> S[i];
    }
    sort(S.begin(), S.end));

    for(i=0; i<N; i++){
        cout << s[i];
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'steing' was not declared in this scope; did you mean 'stdin'?
    9 |     steing S;
      |     ^~~~~~
      |     stdin
a.cc:11:16: error: 'S' was not declared in this scope
   11 |         cin >> S[i];
      |                ^
a.cc:13:10: error: 'S' was not declared in this scope
   13 |     sort(S.begin(), S.end));
      |          ^
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(S.begin(), S.end));
      |     ^~~~
      |     short
a.cc:16:17: error: 's' was not declared in this scope
   16 |         cout << s[i];
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main() {
    int N, L, i;
    cin >> N;
    cin >> L;

    steing s;
    for (i=0; i<N; i++){
        cin >> s[i];
    }
    sort(A.begin(), A.end));

    for(i=0; i<N; i++){
        cout << s[i];
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'steing' was not declared in this scope; did you mean 'stdin'?
    9 |     steing s;
      |     ^~~~~~
      |     stdin
a.cc:11:16: error: 's' was not declared in this scope
   11 |         cin >> s[i];
      |                ^
a.cc:13:10: error: 'A' was not declared in this scope
   13 |     sort(A.begin(), A.end));
      |          ^
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(A.begin(), A.end));
      |     ^~~~
      |     short
a.cc:16:17: error: 's' was not declared in this scope
   16 |         cout << s[i];
      |                 ^
Language: C++

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

#include <algorithm>

#define rep(i, N) for (int i = 0; i < (N); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
 
using ll = long long;
using i_i = tuple<int, int>;

int main(){
    int N,L;
    cin >> N >> L;
    vector<string> S(N);
    rep(i, N) cin >> S[i];
    sort(S.begin(),S.end());
    cout << join(S,"");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'join' was not declared in this scope
   19 |     cout << join(S,"");
      |             ^~~~
Language: Java

import java.util.*;
import java.io.*;
class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	String str = scan.next();
    	int N = Integer.parseInt(str);
      	str = scan.next();
      	int L = Integer.parseInt(str);
      	List<String> list = new ArrayList<>();
      	
      	for(int i = 0; i < N; i++){
        	String input = scan.next();
          	list.add(input);
        }
      	
      	Arrays.sort(list);
      	String ans = new String;
      	for(i = 0; 2 ; i++){
        	input = list.get(i);
          	ans = ans + input;
        }
    	System.out.println(ans);
    }
}

Compiler output:
Main.java:18: error: '(' or '[' expected
      	String ans = new String;
      	                       ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int n, l; cin >> n >> l;
  string s[n];
  for(int i = 0; i < n; i++)
    cin >> s[i];
  sort(s.begin(), s.end());
  for(int i = 0; i < n; i++)
    cout << s[i];
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   11 |   sort(s.begin(), s.end());
      |          ^~~~~
a.cc:11:21: error: request for member 'end' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   11 |   sort(s.begin(), s.end());
      |                     ^~~
Language: C++

#include <bits/stdc++.h>

#define rep(i, k) for (ll i = 0; i < k; i++)
#define pair(x, y) make_pair((x), (y))

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;

int main() {
    int ans = 0;
    int n, l;
    cin >> n >> l;
    vector<string> s(n);
    rep(i, n) { cin >> s[i]; }
    sort(s.begin, s.end);
    rep(i, n) { cout << s[i]; }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   16 |     sort(s.begin, s.end);
      |     ~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   template argument deduction/substitution failed:
a.cc:16:9: note:   couldn't deduce template parameter '_RAIter'
   16 |     sort(s.begin, s.end);
      |     ~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

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

  int main()
 {
     int n,l;
     cin >>n>>l;
      vector<string> vecS;
      while(n--)
      {
          string s;
          cin >> s;
          vecS.push_back(s);
      }
          sort(vecS.begin(), vecS.end());
          for(auto i: vecS)
          {
              cout << i;
          }
          cout << endl;
 }
~                                                                                                                       ~        

Compiler output:
a.cc:22:121: error: expected class-name before '~' token
   22 | ~                                                                                                                       ~
      |                                                                                                                         ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <vector>
#define rep(i,n) for(int i=0; i< int(n); i++)
using namespace std;


int main(){
	int n, l;
	cin >> n >> l;
	string s[n];
	rep(i,n) cin >> s[i];
	sort(s, s+n);
	string ans ;
	rep(i,l) ans += s[i]
	cout << ans << endl;

	

} 



Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: expected ';' before 'cout'
   17 |         rep(i,l) ans += s[i]
      |                             ^
      |                             ;
   18 |         cout << ans << endl;
      |         ~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <vector>
#define rep(i,n) for(int i=0; i< int(n); i++)
using namespace std;


int main(){
	int n, l;
	cin >> n >> l;
	rep(i,n) cin >> s[i];
	sort(s, s+n);
	string ans ;
	rep(i,l) ans += s[i]
	cout << ans << endl;

	

} 



Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 's' was not declared in this scope
   13 |         rep(i,n) cin >> s[i];
      |                         ^
a.cc:14:14: error: 's' was not declared in this scope
   14 |         sort(s, s+n);
      |              ^
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(){
  int N, L;
  cin >> N >> L;
  string tmp;
  
  string str[N];
  for(int i = 0; i < N; i++){
  	cin >> str[i];
  }
  
  for(int i = 0; i < N; i++){
  	for(int j = i + 1; j < N; j++){
      if(str[i].conpare(str[j]) < 0){
      	tmp = str[i];
        str[i] = str[j];
        str[j] = tmp;
      }
    }
  }
  
  for(int i = 1; i < N; i++){
  	str[0] += str[i];
  }
  
  cout << str[0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'conpare'; did you mean 'compare'?
   17 |       if(str[i].conpare(str[j]) < 0){
      |                 ^~~~~~~
      |                 compare
Language: C++

#pragma once

#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <queue>
#include <list>
#include <vector>
#include <array>
#include <algorithm>
#include <iterator>


bool compare(const std::string& _lhs, const std::string& _rhs)
{
	for (int i = 0; i < _lhs.size(); i++)
	{
		if (i >= _rhs.size() ) return false;
		if (_lhs[i] > _rhs[i]) return false;
		else if (_lhs[i] < _rhs[i]) return true;
	}

	return _lhs.size() <= _rhs.size();
}


int abc_042_b()
{
	int N, L = -1;

	std::vector<std::string> inputVector;
	
	std::string first;
	std::getline(std::cin, first);
	std::istringstream ifst(first);

	ifst >> N >> L;

	for (int i = 0; i < N; i++)
	{
		std::string s;
		std::getline(std::cin, s);
		std::istringstream iss(s);
		inputVector.push_back(iss.str());
	}


	std::sort(inputVector.begin(), inputVector.end(), compare);

	std::ostringstream os;
	//std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
	std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
	std::string s = os.str();

	std::cout << s << std::endl;

	return 0;
}

Compiler output:
a.cc:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {

	int N,L;cin>>N,L;
vector<string> S(N);
  string A="";

for(int i=0; i<N; i++){
  cin>>S.at(i);}
sort(S.begin(),b.end());

  for(int i=0; i<N; i++){
    A += S.at(i);}
	
	cout<<A<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'b' was not declared in this scope
   12 | sort(S.begin(),b.end());
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  vector<string>s(b);
	for(int i=0;i<n;i++){
      cin >> s[i];
	}
	sort(s.begin(),s.end());
	for(int i=0;i<n;i++){
		cout << s[i];
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: 'n' was not declared in this scope
    7 |         for(int i=0;i<n;i++){
      |                       ^
a.cc:11:23: error: 'n' was not declared in this scope
   11 |         for(int i=0;i<n;i++){
      |                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  vector<string>s(n);
	for(int i=0;i<n;i++){
      cin >> s[i];
	}
	sort(s.begin(),s.end());
	for(int i=0;i<n;i++){
		cout << s[i];
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: 'n' was not declared in this scope
    6 |   vector<string>s(n);
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  string s[b];
  for(int i=0;i<b;i++){
    cin >> s[i];
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(s[i]>s[j]){
        swap(s[i],s[j]);
      }
    }
  }
  for(int i=0;i<b;i++){
    cout << s[i];
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'n' was not declared in this scope
   10 |   for(int i=0;i<n;i++){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  string s[b];
  for(int i=0;i<b;i++){
    cin >> s[i];
  }
  sort(s,s+b);
  for(int i=00;i<b;i++){
    cout << s[i];
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main()
{
  int n, l;
  cin>>n>>l;
  vector<string> arr(n);
  for(int i=0;i<n;i++)
  {
    cin>>arr[i];
  }
  sort(arr.begin(), arr.end());
  for(int i=0;i<n;i++)
  {
    cout<<arr[i]<<endl;
  }
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: expected '}' at end of input
   18 |   return 0;
      |            ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	vector< string > s(n);
	for(int i=0;i<n;i++)
		cin>>s.at(i);
	sort(s.begin(),s.end());
	for(i=1;i<n;i++)
		s.at(0)=s.at(0)+s.at(i);
	cout<<s.at(0)<<endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'i' was not declared in this scope
   11 |         for(i=1;i<n;i++)
      |             ^
Language: C++

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long int ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<long long int> vl;
typedef vector<vector<int>> vvi;
typedef vector<vector<long long int>> vvl;
typedef pair<int, int> pii;
typedef pair<long long int, long long int> pll;
typedef vector<pair<int, int>> vii;
typedef vector<pair<long long int, long long int>> vll;
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define test() long long int t; cin >> t; cin.ignore(); while(t--) 
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define MOD 1000000007
#define SMOD 998244353
#define pq priority_queue
#define all(x) x.begin(),x.end()
#define SP(x) setprecision(x)
#define sp " "
#define inp(a) ll a;cin>>a;cin.ignore()
#define inps(a,b) ll a,b;cin>>a>>b;cin.ignore()
#define out(a) cout<<SP(20)<<a<<'\n'
#define outs(a,b) cout<<SP(20)<<a<<" "<<b<<'\n'
#define ins insert
#define er erase
#define lb lower_bound
#define ub upper_bound
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";
#define inpa(a,n) ll a[n]; for(int i=0; i<n; i++){cin>>a[i];}
#define inpv(a,n) vl a; for(int i=0; i<n; i++){inp(x);a.pb(x);}
#define outa(a,n) for(int i=0;i<n;i++){cout<<a[i]<<" ";}cout<<'\n';
#define outv(v) for(auto i:v){cout<<i<<;}cout<<'\n';
set<char> vow = {'a','e','i','o','u','A','E','I','O','U'};
ll xpow(ll n, ll m){if(m==0){return 1;}else{ll x = xpow(n, m/2);if(m&1){return x*x*n;}else{return x*x;}}}
ll xmod(ll a, ll m){return (((a%m)+m)%m);}
ll xmodpow(ll n, ll m, ll y){if(m==0){return 1;}else{ll x = xmodpow(n, m/2, y);if(m&1){return xmod((xmod((xmod(x,y)*xmod(x,y)),y)*xmod(n,y)),y);}else{return xmod((xmod(x,y)*xmod(x,y)),y);}}}
 
int main(){
    fast();
 
/* you get what you work for not what you wish for */
    
    ll n, l;
    cin >> n >> l;
    vector <string> a(n);
    for(int i=0; i<n; i++){
        cin >> a[i];
    }
    sort(all(a));
    outv(a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:40: error: expected primary-expression before ';' token
   44 | #define outv(v) for(auto i:v){cout<<i<<;}cout<<'\n';
      |                                        ^
a.cc:62:5: note: in expansion of macro 'outv'
   62 |     outv(a);
      |     ^~~~
Language: C++

clude<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
      string s[100];
 
  for(int i=0;i<n;i++){
    cin>>s[i];
  }
  sort(s,s+n);
  for(int i=0;i<n;i++0)
      {
        cout<<s[i];
      }
      }

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude<bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:7:7: error: 'string' was not declared in this scope
    7 |       string s[100];
      |       ^~~~~~
a.cc:10:10: error: 's' was not declared in this scope
   10 |     cin>>s[i];
      |          ^
a.cc:12:8: error: 's' was not declared in this scope
   12 |   sort(s,s+n);
      |        ^
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(s,s+n);
      |   ^~~~
      |   short
a.cc:13:22: error: expected ')' before numeric constant
   13 |   for(int i=0;i<n;i++0)
      |      ~               ^
      |                      )
a.cc:13:23: error: expected ';' before ')' token
   13 |   for(int i=0;i<n;i++0)
      |                       ^
      |                       ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
      string s[100];

  for(int i=0;i<n;i++){
    cin>>s[i];
  }
  sort(s,s+n);
  for(int i=0;i<n;i++0
      {
        cout<<s[i];
      }
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected ')' before numeric constant
   13 |   for(int i=0;i<n;i++0
      |      ~               ^
      |                      )
a.cc:13:23: error: expected ';' before '{' token
   13 |   for(int i=0;i<n;i++0
      |                       ^
      |                       ;
   14 |       {
      |       ~
Language: C++

#include<iostream>
#include<vector>
using namesapce std;

vector<string> v;
int main(){
	string s1;
    int n,m;
    cin>>n>>m;
    for(int i = 0; i < n; ++i){
    	cin>>s1;
    	v.push_back(s1);
    }
    
    sort(v.begin(), v.end());
    for (string &s : v)
        cout << s;


}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
    3 | using namesapce std;
      |       ^~~~~~~~~
a.cc:5:1: error: 'vector' does not name a type
    5 | vector<string> v;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s1;
      |         ^~~~~~
a.cc:7:9: 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:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin>>n>>m;
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:14: error: 's1' was not declared in this scope
   11 |         cin>>s1;
      |              ^~
a.cc:12:9: error: 'v' was not declared in this scope
   12 |         v.push_back(s1);
      |         ^
a.cc:15:10: error: 'v' was not declared in this scope
   15 |     sort(v.begin(), v.end());
      |          ^
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |     sort(v.begin(), v.end());
      |     ^~~~
      |     short
a.cc:16:20: error: found ':' in nested-name-specifier, expected '::'
   16 |     for (string &s : v)
      |                    ^
      |                    ::
a.cc:16:18: error: 's' has not been declared
   16 |     for (string &s : v)
      |                  ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:17:19: error: expected ';' before '}' token
   17 |         cout << s;
      |                   ^
      |                   ;
......
   20 | }
      | ~                  
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:17:19: error: expected ')' before '}' token
   17 |         cout << s;
      |                   ^
      |                   )
......
   20 | }
      | ~                  
a.cc:16:9: note: to match this '('
   16 |     for (string &s : v)
      |         ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

//
//  main.cpp
//  Practice
//
//  Created by Hajime Sakamoto on 2019/12/17.
//  Copyright © 2019 Hajime Sakamoto. All rights reserved.
//  http://7ujm.net/stl/sort.html

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>

using namespace std;

//数N，長さLの文字列を辞書順にソートして結合するクラス
class Iroha
{
public:
    int N;
    int L;
    vector<string> data;
    string s;
    string s_outPut;
    
    void s_input(){
        data.clear();
        
//        while(1) {
//            cin >> s;
//            if (cin.eof()) break;
//            data.push_back(s);
//        }
        for(int i = 0; i<N; i++) {
            cin >> s;
            data.push_back(s);
        }
    }
    
    void s_sort(){
        std::sort(data.begin(),data.end());//昇順ソート
                }
    
    void s_join(){//ostream_iteratorクラスで結合処理を実現
        std::ostringstream os;
        std::copy(data.begin(), data.end(), std::ostream_iterator<std::string>(os));
        s_outPut  = os.str(); // 文字列結合
    }
};



int main(int argc, const char * argv[]) {
    Iroha Prc;
    cin >> Prc.N;
    cin >> Prc.L;
    
    Prc.s_input();
    Prc.s_sort();
    Prc.s_join();
    
    cout << Prc.s_outPut;
    
    return 0;
}


Compiler output:
a.cc: In member function 'void Iroha::s_join()':
a.cc:47:50: error: 'ostream_iterator' is not a member of 'std'
   47 |         std::copy(data.begin(), data.end(), std::ostream_iterator<std::string>(os));
      |                                                  ^~~~~~~~~~~~~~~~
a.cc:14:1: note: 'std::ostream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
   13 | #include <sstream>
  +++ |+#include <iterator>
   14 | 
a.cc:47:78: error: expected primary-expression before '>' token
   47 |         std::copy(data.begin(), data.end(), std::ostream_iterator<std::string>(os));
      |                                                                              ^
Language: C++

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


int main(){
    int L,N;
    int flag =　1;      
    vector<string> S(N);
    cin >> L >> N;
    for(int i=0;i<N;i++){
        cin >> S.at(i);
    }

    for(i : S){
        if(i.size != L) flag = 0;
    }
    

    sort(S.begin(),S.end());
    string sum;
    for(auto S_dash : S){
        sum = sum + S_dash;
    }
    if(flag = 1)
    cout << sum << endl;
    else
    cout << -1 <<endl;
}

Compiler output:
a.cc:8:15: error: extended character 　 is not valid in an identifier
    8 |     int flag =　1;
      |               ^
a.cc: In function 'int main()':
a.cc:8:15: error: '\U000030001' was not declared in this scope
    8 |     int flag =　1;
      |               ^~~
a.cc:15:11: error: found ':' in nested-name-specifier, expected '::'
   15 |     for(i : S){
      |           ^
      |           ::
a.cc:15:9: error: 'i' has not been declared
   15 |     for(i : S){
      |         ^
a.cc:20:9: error: could not convert 'std::sort<__gnu_cxx::__normal_iterator<__cxx11::basic_string<char>*, vector<__cxx11::basic_string<char> > > >(S.std::vector<std::__cxx11::basic_string<char> >::begin(), S.std::vector<std::__cxx11::basic_string<char> >::end())' from 'void' to 'bool'
   20 |     sort(S.begin(),S.end());
      |     ~~~~^~~~~~~~~~~~~~~~~~~
      |         |
      |         void
a.cc:21:12: error: expected primary-expression before 'sum'
   21 |     string sum;
      |            ^~~
a.cc:21:11: error: expected ')' before 'sum'
   21 |     string sum;
      |           ^~~~
      |           )
a.cc:15:8: note: to match this '('
   15 |     for(i : S){
      |        ^
a.cc:21:12: error: 'sum' was not declared in this scope
   21 |     string sum;
      |            ^~~
a.cc:23:9: error: 'sum' was not declared in this scope
   23 |         sum = sum + S_dash;
      |         ^~~
a.cc:26:13: error: 'sum' was not declared in this scope
   26 |     cout << sum << endl;
      |             ^~~
Language: C++

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


int main(){
    int L,N;
    vector<string> S(N);
    cin >> L >> N;
    for(int i=0;i<N;i++){
        cin >> S.at(i);
    }

    sort(S.begin(),S.end());
    string sum;
    for(aut S_dash : S){
        sum = S_dash;
    }
    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'aut' was not declared in this scope; did you mean 'auto'?
   16 |     for(aut S_dash : S){
      |         ^~~
      |         auto
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:19:25: error: expected ')' before '}' token
   19 |     cout << sum << endl;
      |                         ^
      |                         )
   20 | }
      | ~                        
a.cc:16:8: note: to match this '('
   16 |     for(aut S_dash : S){
      |        ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

#include <stdio.h>
#include <string.h>
char c[110][110],d[150];
int n,l,i,j;
int main()
{
	
	scanf("%d%d",&n,&l);
	getchar();
	for(i=0;i<n;i++)
	gets(c[i]);
	for(i=0;i<n-1;i++)
	  {
	  for(j=0;j<n-i-1;j++)
	    if(strcmp(c[j],c[j+1])>0)
	    {
	    	strcpy(d,c[j]);
	    	strcpy(c[j],c[j+1]);
	    	strcpy(c[j+1],d);
			}
			}	
	    for(i=0;i<=n;i++)
		printf("%s",c[i]);	
		
	 } 
	 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |         gets(c[i]);
      |         ^~~~
      |         getw
Language: C

#include<stdio.h>
int main()
{
	int N,L,i=1,j=1,S[101],T[101];
	//char 
	scanf("%d%d",&N,&L);
	for(;j<=100;j++)					//定义 “字典” 
	{
		S[j]=('a'+j-1);
	} 
	j=1;
	while(j<=100)
	{
		printf("%c\n",S[j]);			//验证是否成功赋值 
		j++;
	}*/
	for(;i<=N;i++)						//输入N个字符串 
	{
		scanf("%s",&T[i]);
	}
	T[1]=1,T[2]=2; 
	printf("%d%d\n",T[1],T[2]);
	return 0;
}								//先比较每个字符串的开头，再把于字典中小的放前面 ，然后除每个字符串开头的剩余部分接在开头后不变 

Compiler output:
main.c: In function 'main':
main.c:16:11: error: expected expression before '/' token
   16 |         }*/
      |           ^
Language: C

#include<stdio.h>
#include<string.h>

void str_swap(char str1[],char str2[])
{
	char str[128];
	strcpy(str,str1);
	strcpy(str1,str2);
	strcpy(str2,str);
}

int dictionary(char str1[],char str2[])
{
	int ans,i,len;
	if(strlen(str1) < strlen(str2))
	{
		len = strlen(str1);
		ans = 1;
	}else
	{
		len = strlen(str2);
		ans = 2;
	}
	
	for(i=0;i<len;i++)
	{
		if(str1[i]>str2[i])
		{
			ans = 2;
			break;
		}else if(str1[i]<str2[i])
		{
			ans = 1;
			break;
		}
	}
	return ans;
}
int main(void)
{
	int num,len;
	char str[128];
	
	fgets(str,sizeof(str),stdin);
	sscanf(str,"%d %d",&num,&len);
	
	char matrix[num+2][len+2];
	
	for(i=0;i<num;i++)
	{
		fgets(&matrix[i],len+2,stdin);
	}
	
	for(i=0;i<num-1;i++)
	{
		for(j=0;j<num-i;j++)
		{
			if(dictionary(&matrix[i+j],&matrix[i+j+1] == 2)
			{
				str_swap(&matrix[i+j],&matrix[i+j+1]);
			}
		}
	}
		
	for(i=0;i<num;i++)
	{
		for(j=0;j<len;j++)
		{
			printf("%c",matrix[i][j]);
		}
	}
		
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:49:13: error: 'i' undeclared (first use in this function)
   49 |         for(i=0;i<num;i++)
      |             ^
main.c:49:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:56:21: error: 'j' undeclared (first use in this function)
   56 |                 for(j=0;j<num-i;j++)
      |                     ^
main.c:58:72: error: expected ')' before '{' token
   58 |                         if(dictionary(&matrix[i+j],&matrix[i+j+1] == 2)
      |                           ~                                            ^
      |                                                                        )
   59 |                         {
      |                         ~                                               
main.c:62:17: error: expected expression before '}' token
   62 |                 }
      |                 ^
Language: C++

import math

line = input()
n, l = [int(x) for x in line.split()]
strings = []
for i in range (n):
	strings.append(input())
strings.sort()
seperator = ''
print(seperator.join(strings))


Compiler output:
a.cc:9:13: error: empty character constant
    9 | seperator = ''
      |             ^~
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iosream>
#include<algorithm>
#include<string>
#include<vector>

int main() {
  int N, L;
  std::cin >> N >> L;
  std::vector<std::string> data(N);
  for (int i=0; i<N; i++) {
    std::cin >> data.at(i);
  }
  std::sort(data.begin(), data.end());
  for (int i=0; i<N; i++) {
    std::cout << data.at(i);
  }
  std::cout << std::endl;
}
  

Compiler output:
a.cc:1:9: fatal error: iosream: No such file or directory
    1 | #include<iosream>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String[] strings = new String[Integer.parseInt(scanner.nextLine().split(" ")[1])];

		for(int i = 0; i < strings.length; i++) {
			strings[i] = scanner.nextLine();
		}

		System.out.println(Arrays.stream(strings).sorted().collect(
				StringBuilder::new, StringBuilder::append, StringBuilder::append));
	}
}

Compiler output:
Main.java:13: error: reference to println is ambiguous
		System.out.println(Arrays.stream(strings).sorted().collect(
		          ^
  both method println(char[]) in PrintStream and method println(String) in PrintStream match
Main.java:13: error: incompatible types: inference variable R has incompatible bounds
		System.out.println(Arrays.stream(strings).sorted().collect(
		                                                          ^
    upper bounds: char[],Object
    lower bounds: StringBuilder
  where R,T are type-variables:
    R extends Object declared in method <R>collect(Supplier<R>,BiConsumer<R,? super T>,BiConsumer<R,R>)
    T extends Object declared in interface Stream
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: C

#include<stdio.h>
void sort(int left,int right);
int strcom(char *pword1,char *pword2);
char *pstr[100];

int main(){
  int N,L;
  int i,j,k=0,len=0;
  char str[101];
  scanf("%d %d",&N,&L);
  char word[N*(L+1)];
  *pstr[k++]=word[0];
  for(i=0;i<N;i++){
    scanf("%s",str);
    j=0;
    do{
      word[len++]=str[j++];
    }while(str[j]!='\0');
    *pstr[k++]=word[len];
  }
  sort(0,N-1);
  for(i=0;i<N;i++)printf("%s",pstr[i]);
}

void sort(int left,int right){
  char *bor;
  char *high[100],*low[100];
  int i,h=0,l=0,len=right-left;
  bor=pstr[left];
  for(i=left+1;i<=left+len;i++){
    if(strcom(bor,pstr[i])==1){
      low[l++]=pstr[i];
    }else if(strcom(bor,pstr[i])==-1){
      high[h++]=pstr[i];
    }
  }
  for(i=0;i<l;i++)pstr[i+left]=low[i];
  for(i=0;i<len-h-l+1;i++)pstr[left+l+i]=bor;
  for(i=0;i<h;i++)pstr[left+len-h+1+i]=high[i];
  if(l>1)sort(left,left+l-1);
  if(h>1)sort(right-h+1,right);
}
int strcom(char *pword1,char *pword2){
  int i;
  if(*pword1>*pword2)return 1;
  else if(*pword1<*pword2)return -1;
  else if(*pword1==*pword2){
    if(*(pword+1)!='\0')return strcom(pword+1,pword+1);
    else return 0;
  }
}
  
  


Compiler output:
main.c: In function 'strcom':
main.c:48:10: error: 'pword' undeclared (first use in this function); did you mean 'pword2'?
   48 |     if(*(pword+1)!='\0')return strcom(pword+1,pword+1);
      |          ^~~~~
      |          pword2
main.c:48:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
void sort(int left,int right);
int strcom(char *pword1,char *pword2);
char *pstr[100];

int main(){
  int N,L;
  int i,j,k=0,len=0;
  char str[101];
  scanf("%d %d",&N &L);
  char word[N*(L+1)];
  *pstr[k++]=word[0];
  for(i=0;i<N;i++){
    scanf("%s",str);
    j=0;
    do{
      word[len++]=str[j++];
    }while(str[j]!='\0');
    *pstr[k++]=word[len];
  }
  sort(0,N-1);
  for(i=0;i<N;i++)printf("%s",pstr[i]);
}

void sort(int left,int right){
  char *bor;
  char *high[100],*low[100];
  int i,h=0,l=0,len=right-left;
  bor=pstr[left];
  for(i=left+1;i<=left+len;i++){
    if(strcom(bor,pstr+i)==1){
      low[l++]=pstr[i];
    }else if(strcom(bor,pstr+i)==-1){
      high[h++]=pstr[i];
    }
  }
  for(i=0;i<l;i++)pstr[i+left]=low[i];
  for(i=0;i<len-h-l+1;i++)pstr[left+l+i]=bor;
  for(i=0;i<h;i++)pstr[left+len-h+1+i]=high[i];
  if(l>1)sort(left,left+l-1);
  if(h>1)sort(right-h+1,right);
}
int strcom(char *pword1,char *pword2){
  int i;
  if(*pword1>*pword2)return 1;
  else if(*pword1<*pword2)retun -1;
  else if(*pword1==*pword2){
    if(*(pword+1)!='\0')return strcom(*(pword+1),*(pword+1));
    else return 0;
  }
}
  
  

Compiler output:
main.c: In function 'main':
main.c:10:20: error: invalid operands to binary & (have 'int *' and 'int')
   10 |   scanf("%d %d",&N &L);
      |                 ~~ ^
      |                 |
      |                 int *
main.c: In function 'sort':
main.c:31:23: error: passing argument 2 of 'strcom' from incompatible pointer type [-Wincompatible-pointer-types]
   31 |     if(strcom(bor,pstr+i)==1){
      |                   ~~~~^~
      |                       |
      |                       char **
main.c:3:31: note: expected 'char *' but argument is of type 'char **'
    3 | int strcom(char *pword1,char *pword2);
      |                         ~~~~~~^~~~~~
main.c:33:29: error: passing argument 2 of 'strcom' from incompatible pointer type [-Wincompatible-pointer-types]
   33 |     }else if(strcom(bor,pstr+i)==-1){
      |                         ~~~~^~
      |                             |
      |                             char **
main.c:3:31: note: expected 'char *' but argument is of type 'char **'
    3 | int strcom(char *pword1,char *pword2);
      |                         ~~~~~~^~~~~~
main.c: In function 'strcom':
main.c:46:27: error: 'retun' undeclared (first use in this function)
   46 |   else if(*pword1<*pword2)retun -1;
      |                           ^~~~~
main.c:46:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:48:10: error: 'pword' undeclared (first use in this function); did you mean 'pword2'?
   48 |     if(*(pword+1)!='\0')return strcom(*(pword+1),*(pword+1));
      |          ^~~~~
      |          pword2
Language: C++

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

int main()
{
int n,k;
cin >> n >> k;
vector <string> v(n);
string s;
for (int i = 0; i < k; i++){
    cin >> s;
    v.push_back(s);
}
sort(v.begin(),v.end());

for (int i= 0; i<v.size(); i++){
    cout << v[i];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,l;
  cin >> n >> l;
  vector<string>str(n);
  for(int i=0;i<n;i++){
    cin >> str.at(i)
  }
  sort(str.begin(),str.end());
  string ans ="";
  for(int i =0;i<n;i++){
    ans += str.at(i);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before '}' token
    8 |     cin >> str.at(i)
      |                     ^
      |                     ;
    9 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,l;
  cin >> n >> l;
  vector<string>str(n);
  for(int i=0;i<n;i++){
    cin >> string.at(i)
  }
  sort(str.begin(),str.end());
  string ans ='';
  for(int i =0;i<n;i++){
    ans += str.at(i);
  }
  cout << ans << endl;
}

Compiler output:
a.cc:11:15: error: empty character constant
   11 |   string ans ='';
      |               ^~
a.cc: In function 'int main()':
a.cc:8:18: error: expected primary-expression before '.' token
    8 |     cin >> string.at(i)
      |                  ^
a.cc:11:15: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |   string ans ='';
      |               ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n, l;
  cin >> n >> l;
  vector<string> s(n);
  for(int i=0;i<n;i++) cin >> s(i);
  sort(s.begin(),s.end());
  for(int i=0;i<n;i++) cout << s(i);
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
    7 |   for(int i=0;i<n;i++) cin >> s(i);
      |                               ~^~~
a.cc:9:33: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
    9 |   for(int i=0;i<n;i++) cout << s(i);
      |                                ~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n, l;
  cin >> n >> l;
  vector<string> s(n);
  for(i=0;i<n;i++) cin >> s(i);
  sort(s.begin(),s.end());
  for(i=0;i<n;i++) cout << s(i);
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<n;i++) cin >> s(i);
      |       ^
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0;i<n;i++) cout << s(i);
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int n,l;
  cin >> n >> l;
  vector<string> s(n);
  for(int i=0;i<n;i++) cin >> s.at(i);
  sort(s.begin(),s.end());
  for(int j=0;j<n;j++) cout << s.at(i);
  cout << endl;
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: 'i' was not declared in this scope
   10 |   for(int j=0;j<n;j++) cout << s.at(i);
      |                                     ^
Language: C++

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

int main(){
  int n,l;
  cin >> n >> l;
  vector<strng> s(n);
  for(int i=0;i<n;i++) cin >> s.at(i);
  sort(s.begin(),s.end());
  for(int j=0;j<n;j++) cout << s.at(i);
  cout << endl;
  return 0;
}
        
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'strng' was not declared in this scope
    7 |   vector<strng> s(n);
      |          ^~~~~
a.cc:7:15: error: template argument 1 is invalid
    7 |   vector<strng> s(n);
      |               ^
a.cc:7:15: error: template argument 2 is invalid
a.cc:8:33: error: request for member 'at' in 's', which is of non-class type 'int'
    8 |   for(int i=0;i<n;i++) cin >> s.at(i);
      |                                 ^~
a.cc:9:10: error: request for member 'begin' in 's', which is of non-class type 'int'
    9 |   sort(s.begin(),s.end());
      |          ^~~~~
a.cc:9:20: error: request for member 'end' in 's', which is of non-class type 'int'
    9 |   sort(s.begin(),s.end());
      |                    ^~~
a.cc:10:34: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |   for(int j=0;j<n;j++) cout << s.at(i);
      |                                  ^~
a.cc:10:37: error: 'i' was not declared in this scope
   10 |   for(int j=0;j<n;j++) cout << s.at(i);
      |                                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n, l;
  string s;
  cin >> n >> l;
  vector<string> vec(n).
    
  for(int i=0; i<n; i++){
    cin >> vec.at(i);
  }
  
  sort(vec.begin(), vec.end());
  s=vec.at(0);
  
  for(int i=1; i<n; i++){
    s += vec(i);
  }
  cout << s <<endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ',' or ';' before '.' token
    8 |   vector<string> vec(n).
      |                        ^
a.cc:10:16: error: 'i' was not declared in this scope
   10 |   for(int i=0; i<n; i++){
      |                ^
a.cc:18:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   18 |     s += vec(i);
      |          ~~~^~~