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

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

Compiler output:
main.c:1:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    1 | #icnlude<stdio.h>
      |  ^~~~~~~
      |  include
main.c:3:2: error: invalid preprocessing directive #icnlude; did you mean #include?
    3 | #icnlude<stdlib.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |         scanf("%d%d",&n,&l);
      |         ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<string.h>
  +++ |+#include <stdio.h>
    3 | #icnlude<stdlib.h>
main.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |         scanf("%d%d",&n,&l);
      |         ^~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:30: error: expected expression before ')' token
   12 |      for(int j=0; j<n-1-i; j+){
      |                              ^
main.c:14:26: error: variable-sized object may not be initialized except with an empty initializer
   14 |         char temp[l+1] = { "" };
      |                          ^
main.c:22:6: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |      printf("%s",string[[i]);
      |      ^~~~~~
main.c:22:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:25: error: expected expression before '[' token
   22 |      printf("%s",string[[i]);
      |                         ^
Language: C++

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

int main() {
  int N, L;
  cin >> N >> L;
  
  vector<string> S;
  for (int i = 0; i < N; i++) {
    string s;
    cin >> s;
    
    S.push_back(s)
  }
  
  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:13:19: error: expected ';' before '}' token
   13 |     S.push_back(s)
      |                   ^
      |                   ;
   14 |   }
      |   ~
Language: Java

import java.util.Scanner;
import java.util.ArrayList;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    
    int n = scanner.nextInt();
    int l = scanner.nextInt();
    
    ArrayList<String> word = new ArrayList<>();
    
    // n回データを取得し格納する
    for(int i = 0; i < n; i++) {
      word.add(scanner.next());
    }
    
    // 自然順序（Stringであれば辞書順）にソート
    word.sort(Comparator.naturalOrder());
    
    // listの中の要素を区切らずに連続して出力
    for(String w: word) {
      System.out.print(w);
    }
  }
}


Compiler output:
Main.java:19: error: cannot find symbol
    word.sort(Comparator.naturalOrder());
              ^
  symbol:   variable Comparator
  location: class Main
1 error
Language: Java

import java.util.Scanner;
import java.util.ArrayList;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    
    int n = scanner.nextInt();
    int l = scanner.nextInt();
    
    ArrayList<String> word = new ArrayList<>();
    
    // n回データを取得し格納する
    for(int i = 0; i < n; i++) {
      word.add(scanner.next());
    }
    
    word.sort();
    
    // listの中の要素を区切らずに連続して出力
    for(String w: word) {
      System.out.print(w);
    }
  }
}


Compiler output:
Main.java:18: error: method sort in class ArrayList<E> cannot be applied to given types;
    word.sort();
        ^
  required: Comparator<? super String>
  found:    no arguments
  reason: actual and formal argument lists differ in length
  where E is a type-variable:
    E extends Object declared in class ArrayList
1 error
Language: Java

import java.util.Scanner;
import java.util.ArrayList;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    
    int n = scanner.nextInt();
    int l = scanner.nextInt();
    
    ArrayList<String> word = new ArrayList<>();
    
    // n回データを取得し格納する
    for(int i = 0; i < n; i++) {
      word.add(scanner.next());
    }
    
    ArrayList<String> sortedWord = word.sort();
    
    // listの中の要素を区切らずに連続して出力
    for(String w: sortedWord) {
      System.out.print(w);
    }
  }
}


Compiler output:
Main.java:18: error: method sort in class ArrayList<E> cannot be applied to given types;
    ArrayList<String> sortedWord = word.sort();
                                       ^
  required: Comparator<? super String>
  found:    no arguments
  reason: actual and formal argument lists differ in length
  where E is a type-variable:
    E extends Object declared in class ArrayList
1 error
Language: Java

N, L = list(map(int, input().split()))
arr_input=[]
for i in range(N):
	input_ = input()
	if(len(input_)!=L):
		print("Input length is wrong")
		exit()
	arr_input.append(input_)
arr_input.sort()
print("".join(arr_input))

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
N, L = list(map(int, input().split()))
^
1 error
Language: Java

import java.util.*;
import java.io.*;

public class KindergartenCountingGame {
	public static void main(String[] args)  {
	Scanner in = new Scanner(System.in);
	int n = in.nextInt(),m = in.nextInt();;	
	ArrayList<String> a = new ArrayList<>(n);
	for (int i = 0; i < n; i++) {
		String y = in.next();
		a.add(y);
	}
	Collections.sort(a);	
	for (int i = 0; i < n; i++) {
		System.out.print(a.get(i));
	}	
	System.out.println();
		
	}
	
}



Compiler output:
Main.java:4: error: class KindergartenCountingGame is public, should be declared in a file named KindergartenCountingGame.java
public class KindergartenCountingGame {
       ^
1 error
Language: Java

import java.util.*;
public class Main_IrohaLovesStrings {
    
public static void main (String[]args){
  Scanner input = new Scanner (System.in);
  int n = input.nextInt();
  int l = input.nextInt();
  String [] arr = new String [n];
    for (int i = 0; i < arr.length; i++) {
        arr[i]=input.next();
    }
    Arrays.sort(arr);
    for (int i = 0; i < arr.length; i++) {
        System.out.print(arr[i]);
    }
    System.out.println();

}
}

Compiler output:
Main.java:2: error: class Main_IrohaLovesStrings is public, should be declared in a file named Main_IrohaLovesStrings.java
public class Main_IrohaLovesStrings {
       ^
1 error
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int N, L;
string str[N];
int main(){
  scanf("%d %d", &N, &L);
  for(int i = 1; i < N; i++){
    cin >> str[i];  
  }
  for(int i = 0; i < N; i++){
    string tmp = str[i];
    int j = i - 1;
    while(j >= 0 && str[j] > tmp){
      str[j + 1] = str[j];
      j--;
    }
    str[j+1] = tmp;
  }
  for(int i = 0; i < N; i++) cout << str[i];
  return 0;
}

Compiler output:
a.cc:6:12: error: size of array 'str' is not an integral constant-expression
    6 | string str[N];
      |            ^
Language: C++

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

int main() {
  int n,m;
  cin >> n >> m;
  vector<string> a(n);
  for ( int i=0; i<n; i++ ) cin >> a[i];
  sort(a.begin(),a.end());
  string ans="";
  for ( int i=0; i<N; i++ ) ans+=a[i];
  cout << ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'N' was not declared in this scope
   11 |   for ( int i=0; i<N; i++ ) ans+=a[i];
      |                    ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
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];
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'vector'
    8 |   cin>>N>>L
      |            ^
      |            ;
    9 | 
   10 |   vector<string> S(N);
      |   ~~~~~~    
a.cc:12:10: error: 'S' was not declared in this scope
   12 |     cin>>S[i];
      |          ^
a.cc:16:8: error: 'S' was not declared in this scope
   16 |   sort(S.begin(),S.end());
      |        ^
Language: C++

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());
    string ans;
    for(int i = 0; i < N; i++) {
        ans += S[i];
    }

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> N >> L;
      |     ^~~
a.cc:3:5: error: 'vector' does not name a type
    3 |     vector<string>S(N);
      |     ^~~~~~
a.cc:4:5: error: expected unqualified-id before 'for'
    4 |     for(int i = 0; i < N; i++) {
      |     ^~~
a.cc:4:20: error: 'i' does not name a type
    4 |     for(int i = 0; i < N; i++) {
      |                    ^
a.cc:4:27: error: 'i' does not name a type
    4 |     for(int i = 0; i < N; i++) {
      |                           ^
a.cc:7:9: error: expected constructor, destructor, or type conversion before '(' token
    7 |     sort(S.begin(),S.end());
      |         ^
a.cc:8:5: error: 'string' does not name a type
    8 |     string ans;
      |     ^~~~~~
a.cc:9:5: error: expected unqualified-id before 'for'
    9 |     for(int i = 0; i < N; i++) {
      |     ^~~
a.cc:9:20: error: 'i' does not name a type
    9 |     for(int i = 0; i < N; i++) {
      |                    ^
a.cc:9:27: error: 'i' does not name a type
    9 |     for(int i = 0; i < N; i++) {
      |                           ^
Language: C++

#define tst(a, b) for (int i = 1; i <= (b); i++) {cout << (a)[i] << " ";} cout << endl;
#define ll long long
#define lf long double
#define ch char
#define F(a) for (int i = 1; i <= (a); i++)
#define For(a, b) for (int (a) = 1; (a) <= (b); (a)++)
#define Rep(a, b, c) for (int (a) = (b); (a) <= (c); (a)++)
#define FD(a) for (int i = (a); i >= 1; i--)
#define ForD(a, b) for (int (a) = (b); (a) >= 1; (a)--)
#define RepD(a, b, c) for (int (a) = (b); (a) >= (c); (a)--)
#define mp(a, b) make_pair((a), (b))
#define pb(a) push_back(a)
#define fi first
#define se second
#define il inline
#define reg register
#define ret return
#define opt operator
#define Mem0(a) memset((a), 0, sizeof(a))
#define MemInf(a) memset((a), 115, sizeof(a))
#define Mem(a, n) memset((a), (n), sizeof(a))
#include <cstdio>
#include <iostream>
#include <bits/stdc++.h>
using namespace std;


ll N, L;
string Str[200];

int main()
{
	cin >> N >> L;
	for (int i = 1; i <= N; i++) {
		cin >> Str[i];
	}
	
	sort(Str + 1, Str + N + 1);
	
	for (int i = 1; i <= N; i++) {
		cout << Str[i];
	}
	
	return 0;
}


Compiler output:
In file included from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:24:
/usr/include/c++/14/complex:2631:11: error: unexpected keyword; remove space between quotes and suffix identifier
 2631 |   operator""il(long double __num)
      |           ^~
/usr/include/c++/14/complex:2635:11: error: unexpected keyword; remove space between quotes and suffix identifier
 2635 |   operator""il(unsigned long long __num)
      |           ^~
/usr/include/c++/14/bits/regex_compiler.h: In member function 'std::__detail::_Compiler<_TraitsT>::_StateSeqT std::__detail::_Compiler<_TraitsT>::_M_pop()':
a.cc:17:13: error: expected unqualified-id before 'return'
   17 | #define ret return
      |             ^~~~~~
a.cc:17:13: error: expected primary-expression before 'return'
   17 | #define ret return
      |             ^~~~~~
a.cc:17:13: error: expected ';' before 'return'
a.cc:17:13: error: return-statement with no value, in function returning 'std::__detail::_Compiler<_TraitsT>::_StateSeqT' [-fpermissive]
Language: C++

#define tst(a, b) for (int i = 1; i <= (b); i++) {cout << (a)[i] << " ";} cout << endl;
#define ll long long
#define lf long double
#define ch char
#define F(a) for (int i = 1; i <= (a); i++)
#define For(a, b) for (int (a) = 1; (a) <= (b); (a)++)
#define Rep(a, b, c) for (int (a) = (b); (a) <= (c); (a)++)
#define FD(a) for (int i = (a); i >= 1; i--)
#define ForD(a, b) for (int (a) = (b); (a) >= 1; (a)--)
#define RepD(a, b, c) for (int (a) = (b); (a) >= (c); (a)--)
#define mp(a, b) make_pair((a), (b))
#define pb(a) push_back(a)
#define fi first
#define se second
#define il inline
#define reg register
#define ret return
#define opt operator
#define Mem0(a) memset((a), 0, sizeof(a))
#define MemInf(a) memset((a), 115, sizeof(a))
#define Mem(a, n) memset((a), (n), sizeof(a))
#include <cstdio>
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
inline ll Rd() {
	ll C = getchar();
	ll V = 0;
	ll Sign = 0;
	while (C > '9' || C < '0') {
		Sign |= (C == '-');
		C = getchar();
	}

	while (C <= '9' && C >= '0') {
		V = (V << 1) + (V << 3) + (C ^ '0');
		C = getchar();
	}
	Sign && (V = -V);
	return V;
}

ll N, L;
string Str[100010];

int main()
{
	cin >> N >> L;
	for (int i = 1; i <= N; i++) {
		cin >> Str[i];
	}
	
	sort(Str + 1, Str + N + 1);
	
	for (int i = 1; i <= N; i++) {
		cout << Str[i];
	}
	
	return 0;
}


Compiler output:
In file included from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:24:
/usr/include/c++/14/complex:2631:11: error: unexpected keyword; remove space between quotes and suffix identifier
 2631 |   operator""il(long double __num)
      |           ^~
/usr/include/c++/14/complex:2635:11: error: unexpected keyword; remove space between quotes and suffix identifier
 2635 |   operator""il(unsigned long long __num)
      |           ^~
/usr/include/c++/14/bits/regex_compiler.h: In member function 'std::__detail::_Compiler<_TraitsT>::_StateSeqT std::__detail::_Compiler<_TraitsT>::_M_pop()':
a.cc:17:13: error: expected unqualified-id before 'return'
   17 | #define ret return
      |             ^~~~~~
a.cc:17:13: error: expected primary-expression before 'return'
   17 | #define ret return
      |             ^~~~~~
a.cc:17:13: error: expected ';' before 'return'
a.cc:17:13: error: return-statement with no value, in function returning 'std::__detail::_Compiler<_TraitsT>::_StateSeqT' [-fpermissive]
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,l,i;
  String s[1000];
  i=0;
  cin>> n >> l;
  for(i=0;i<n;i++)
  {
    cin>>s[i];
    
  }
  sort(s+0,s+l);
  for(i=0;i<n;i++)
  {
    cout<<s[i];
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'String' was not declared in this scope
    6 |   String s[1000];
      |   ^~~~~~
a.cc:11:10: error: 's' was not declared in this scope
   11 |     cin>>s[i];
      |          ^
a.cc:14:8: error: 's' was not declared in this scope
   14 |   sort(s+0,s+l);
      |        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'a' was not declared in this scope
   13 |   sort(a,a+l);
      |        ^
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<L;i++){
    cin >> s[i];
  }
  sort(s.begin(),s.end());
  
  for(int i=0;i<L;i++)
  {cout<<s[i];}

return 0;
 

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected '}' at end of input
   18 | return 0;
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
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[i].begin(), S[i].end());
  }
  sort(S.begin(), S.end());
  for (int i = 0; i < N; i++) {
    cout << S[i] << flush;
  }
  cout << endl;
  return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'for'
    8 |         for(int i=0;i<n;i++){
      |         ^~~
a.cc:8:21: error: 'i' was not declared in this scope
    8 |         for(int i=0;i<n;i++){
      |                     ^
a.cc:14:20: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   14 |         sum += data(i);
      |                ~~~~^~~
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){
    	cin >> S[i];
    }
  	sort(S.begin(),S.end());
  	cout << S[0]+S[1]+S[2] << endl;
 	return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ')' token
    8 |         for(int i=0;i<n){
      |                        ^
      |                        ;
a.cc:11:16: 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:26: 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>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ')' token
    8 |         for(int i=0;i<n){
      |                        ^
      |                        ;
a.cc:11:16: error: request for member 'begin' in 'S', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'}
   11 |         sort(S.begin(),S.end());
      |                ^~~~~
a.cc:11:26: error: request for member 'end' in 'S', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'}
   11 |         sort(S.begin(),S.end());
      |                          ^~~
Language: C++

#include <iostream>

using namespace std;

int main() {
    ll N, L;
    cin >> N >> L;
    map<string, int> mp;
    for (int i = 0; i < L; i++) {
        string s;
        cin >> s;
        mp[s] += 1;
    }
    string ans = "";
    for (auto &e : mp) {
        for (int i = 0; i < e.second; i++) {
        ans += e.first;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'll' was not declared in this scope
    6 |     ll N, L;
      |     ^~
a.cc:7:12: error: 'N' was not declared in this scope
    7 |     cin >> N >> L;
      |            ^
a.cc:7:17: error: 'L' was not declared in this scope
    7 |     cin >> N >> L;
      |                 ^
a.cc:8:5: error: 'map' was not declared in this scope
    8 |     map<string, int> mp;
      |     ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | 
a.cc:8:15: error: expected primary-expression before ',' token
    8 |     map<string, int> mp;
      |               ^
a.cc:8:17: error: expected primary-expression before 'int'
    8 |     map<string, int> mp;
      |                 ^~~
a.cc:12:9: error: 'mp' was not declared in this scope
   12 |         mp[s] += 1;
      |         ^~
a.cc:15:20: error: 'mp' was not declared in this scope
   15 |     for (auto &e : mp) {
      |                    ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'st'; did you mean 'at'?
    9 |   for(i=0;i<n;i++) cin >> s.st(i);
      |                             ^~
      |                             at
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'st'; did you mean 'at'?
    9 |   for(i=0;i<n;i++) cin >> s.st(i);
      |                             ^~
      |                             at
Language: C++

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

int main(void){

  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 << "\n";
}


Compiler output:
a.cc:4:10: fatal error: algorythm: No such file or directory
    4 | #include <algorythm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

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

int main(void){

  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 << "n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort((S).begin(), (S).end());
      |   ^~~~
      |   short
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'being'
   11 |   sort(a.being(),a.end());
      |          ^~~~~
Language: C++

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

Compiler output:
a.cc:1:24: error: missing terminating > character
    1 | #include<bits/stdc++.h.
      |                        ^
a.cc:1:9: fatal error: bits/stdc++.h.: No such file or directory
    1 | #include<bits/stdc++.h.
      |         ^
compilation terminated.
Language: C++

#include <bits/stdc++.h> 

using namespace std;

int main(){
	int t,l;
	cin>>t>>l;
	char a[t][l];
	for(int i=0;i<t;i++){
		cin>>a[i];
	}
	sort(a,a+t);
	for(int i=0;i<t;i++){
		cout<<a[i];
	}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: no matching function for call to 'sort(char [t][l], char (*)[l])'
   12 |         sort(a,a+t);
      |         ~~~~^~~~~~~
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:12:13: note:   variable-sized array type 'char (*)[l]' is not a valid template argument
   12 |         sort(a,a+t);
      |         ~~~~^~~~~~~
/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 i,N,L;
  cin >> N >> L;
  string S[101];
  for(i=0;i<N;i++) 
  {
    cin >> S[i];
  }
  sort(S, S+n);
  for(i=0; i<N; i++) 
  {
    cout << S[i];
  }
  cout << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() 
{
  int i,N,L;
  cin >> N >> L;
  vector<string> S;
  for(i=0;i<N;i++) 
  {
    S.push_back(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:11:16: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::push_back(int&)'
   11 |     S.push_back(i);
      |     ~~~~~~~~~~~^~~
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:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'int' to 'const std::vector<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::value_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
Language: C++

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

int main () {
  int N, L;
  int arr[L];
  cin >>  N >> L;
  for (int i = 0; i < N; i ++){
    string s;
    cin >> s;
    arr[i] = s;
  }
  for (int i = 0; i < L; i ++){
    cout << i << " " << arr[i] << '\n';
  }
  sort (arr, arr + L);
  int sum = "";
  for (int i = 0; i < N; i ++){
    sum += arr[i];
  }
  cout << sum << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
   12 |     arr[i] = s;
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
a.cc:18:13: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   18 |   int sum = "";
      |             ^~
      |             |
      |             const char*
Language: C++

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

int main () {
  int N, L;
  string arr[L];
  cin >>  N >> L;
  for (int i = 0; i < N; i ++){
    string s;
    cin >> s;
    arr[i] = s;
  }
  for (int i = 0; i < L; i ++){
    cout << i << " " << arr[i] << '\n';
  }
  sort (arr, arr + N);
  for (int i = 0; i < L; i ++){
    cout << i << " " << arr[i] << '\n';
}

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

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

int main () {
  int N, L;
  string arr[L];
  cin >>  N >> L;
  for (int i = 0; i < N; i ++){
    string s;
    cin >> s;
    arr[i] = s;
  }
  for (int i = 0; i < L; i ++){
    cout << i << " " << arr[i] << '\n';
  }
  sor (arr, arr + N);
  for (int i = 0; i < L; i ++){
    cout << i << " " << arr[i] << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'sor' was not declared in this scope
   17 |   sor (arr, arr + N);
      |   ^~~
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:5:13: note: to match this '{'
    5 | int main () {
      |             ^
Language: C++

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

int main()
{
  int n,l;
  cin>>n>>l;
  string s;
  for(int i=0;i<n;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:12:5: error: 'v' was not declared in this scope
   12 |     v.push_back(s);
      |     ^
a.cc:14:8: error: 'v' was not declared in this scope
   14 |   sort(v.begin(),v.end());
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n,l;
    
    cin>>n>>l;
    string p;
    vector<string> s(t);
    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<<p<<endl;

    return 0;
}

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: expected ';' before '}' token
   14 |     s+=data.at(i)
      |                  ^
      |                  ;
   15 |   }
      |   ~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
#include<iomanip>

#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

using namespace std;

#define debug(x) cout<<(#x)<<"="<<(x)<<", ";
#define debug1(x) debug(x) cout<<'\n';
#define debug2(x1, x2) debug(x1) debug(x2) cout<<'\n';
#define debug3(x1, x2, x3) debug(x1) debug(x2) debug(x3) cout<<'\n';
#define debug4(x1, x2, x3, x4) debug(x1) debug(x2) debug(x3) debug(x4) cout<<'\n';
#define debug5(x1, x2, x3, x4, x5) debug(x1) debug(x2) debug(x3) debug(x4) debug(x5) cout<<'\n';

#define fcout cout<<fixed<<setprecision(15)
#define repp(i,j,k) for(int i=j; i<k; ++i)
#define rep(i,j) repp(i,0,j)
#define rrep(i,j,k) for(int i=j; i>=k; --i)
#define all(x) (x).begin(), (x).end()
#define sort(x) sort(x.begin(), x.end())
#define lb(x,val) lower_bound(x.begin(), x.end(), val)
#define ub(x,val) upper_bound(x.begin(), x.end(), val)
#define pb(x) emplace_back(x);

typedef long long int lli;
typedef pair<int,int> pii;
typedef pair<lli,lli> pll;
typedef vector<int> vi;
typedef vector<lli> vl;
typedef tuple<int, int, lli> tiil;

//const lli M=998244353ll;
const lli M=1000000007ll;
const double D=1.0;

int main(){
	fast_io
	int n,l; cin>>n>>l;
	vector<string> v(n);
	rep(i,n) cin>>v[i];
	sort(v);
	d="";
	rep(i,n){
		d+=v[i];
	}
	cout<<d;
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:9: error: 'd' was not declared in this scope
   50 |         d="";
      |         ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'a' was not declared in this scope
   17 |         ss+=a.at(i);
      |             ^
Language: C++

#include<bis/stdc++.h>

using namespace std;

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


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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;

int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

int main() {
  int n, l;
  vector<string> s(n);
  cin >> n >> l;
  rep(i, n) cin >> s.at(i);
  sort(s.begin(), s.end());
  rep(i, n) cout << s(i);
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   20 |   rep(i, n) cout << s(i);
      |                     ~^~~
Language: C++

//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
//#include<unordered_map>//イテレータあるけど順序保持しないmap
//#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
#include<valarray>//なんとなく追加
//メモ：表示桁数を大きくする　　cout << fixed << setprecision(20) << cm << endl;
using namespace std;
typedef long long ll;

//マクロ
//forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define PI acos(-1.0)
#define answer(ans) cout<<ans<<endl;
#define input(N) cin >> N ;

signed main() {
int L,N;
cin >>L>>N;
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:62:2: error: expected '}' at end of input
   62 | }
      |  ^
a.cc:52:15: note: to match this '{'
   52 | signed main() {
      |               ^
Language: C++

//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
//#include<unordered_map>//イテレータあるけど順序保持しないmap
//#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
#include<valarray>//なんとなく追加
//メモ：表示桁数を大きくする　　cout << fixed << setprecision(20) << cm << endl;
using namespace std;
typedef long long ll;

//マクロ
//forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define PI acos(-1.0)
#define answer(ans) cout<<ans<<endl;
#define input(N) cin >> N ;

signed main() {
int L,N;
cin >>L>>N;
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:57:15: error: expected ']' before ';' token
   57 |     cin >> S[i;]
      |               ^
      |               ]
a.cc:57:16: error: expected primary-expression before ']' token
   57 |     cin >> S[i;]
      |                ^
Language: C++

#include <stdio.h>

struct word
{
	char str[L+1];
};

int N,L;
struct word words[N+1];

int main()
{
	scanf("%d %d",&N,&L);

	for (int i=1;i<=N;i++)
	{
		scanf("%s",words[i].str);
	}

	for (int i=1;i<=N-1;i++)
	{
		for (int j=1;j<=N-i;j++)
		{
			if (strcmp(words[j].str,words[j+1].str))
				swap(j,j+1);
		}
	}
}

void swap(int idx1,int idx2)
{
	struct word tempword;
	strcpy(tempword.str,words[idx1].str);
	strcpy(words[idx1].str,words[idx2].str);
	strcpy(words[idx2].str,tempword.str);
}

Compiler output:
a.cc:5:18: error: 'L' was not declared in this scope
    5 |         char str[L+1];
      |                  ^
a.cc:9:20: error: size of array 'words' is not an integral constant-expression
    9 | struct word words[N+1];
      |                   ~^~
a.cc: In function 'int main()':
a.cc:17:37: error: 'struct word' has no member named 'str'
   17 |                 scanf("%s",words[i].str);
      |                                     ^~~
a.cc:24:45: error: 'struct word' has no member named 'str'
   24 |                         if (strcmp(words[j].str,words[j+1].str))
      |                                             ^~~
a.cc:24:60: error: 'struct word' has no member named 'str'
   24 |                         if (strcmp(words[j].str,words[j+1].str))
      |                                                            ^~~
a.cc:24:29: error: 'strcmp' was not declared in this scope
   24 |                         if (strcmp(words[j].str,words[j+1].str))
      |                             ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | 
a.cc:25:33: error: 'swap' was not declared in this scope
   25 |                                 swap(j,j+1);
      |                                 ^~~~
a.cc: In function 'void swap(int, int)':
a.cc:33:25: error: 'struct word' has no member named 'str'
   33 |         strcpy(tempword.str,words[idx1].str);
      |                         ^~~
a.cc:33:41: error: 'struct word' has no member named 'str'
   33 |         strcpy(tempword.str,words[idx1].str);
      |                                         ^~~
a.cc:33:9: error: 'strcpy' was not declared in this scope
   33 |         strcpy(tempword.str,words[idx1].str);
      |         ^~~~~~
a.cc:33:9: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:34:28: error: 'struct word' has no member named 'str'
   34 |         strcpy(words[idx1].str,words[idx2].str);
      |                            ^~~
a.cc:34:44: error: 'struct word' has no member named 'str'
   34 |         strcpy(words[idx1].str,words[idx2].str);
      |                                            ^~~
a.cc:35:28: error: 'struct word' has no member named 'str'
   35 |         strcpy(words[idx2].str,tempword.str);
      |                            ^~~
a.cc:35:41: error: 'struct word' has no member named 'str'
   35 |         strcpy(words[idx2].str,tempword.str);
      |                                         ^~~
Language: C++

//B - Iroha Loves Strings (ABC Edition)
#include <stdio.h>

int N,L;
char str[N+1][L+1];

int main()
{
	int i,j;
	scanf("%d %d",&N,&L);

	for (i=1;i<=N;i++)
	{
		gets(char[i][]);
	}

	for (i=1;i<=N-1;i++)
	{
		for (j=1;j<=N-i;j++)
		{
			if (strcmp(char[j][],char[j+1][]))
				swap(j,j+1);
		}
	}

}

void swap(int idx1, int idx2)
{
	char temp[L+1];

	for (int i=1;i<=L;i++)
	{
		temp[i] = str[idx1][i];
	}

	for (int i=1;i<=L;i++)
	{
		str[idx1][i] = str[idx2][i];
	}

	for (int i=1;i<=L;i++)
	{
		str[idx2][i] = temp[i];
	}
}

Compiler output:
a.cc:5:16: error: size of array 'str' is not an integral constant-expression
    5 | char str[N+1][L+1];
      |               ~^~
a.cc:5:11: error: size of array 'str' is not an integral constant-expression
    5 | char str[N+1][L+1];
      |          ~^~
a.cc: In function 'int main()':
a.cc:14:22: error: expected primary-expression before 'char'
   14 |                 gets(char[i][]);
      |                      ^~~~
a.cc:14:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |                 gets(char[i][]);
      |                 ^~~~
      |                 getw
a.cc:21:36: error: expected primary-expression before 'char'
   21 |                         if (strcmp(char[j][],char[j+1][]))
      |                                    ^~~~
a.cc:21:46: error: expected primary-expression before 'char'
   21 |                         if (strcmp(char[j][],char[j+1][]))
      |                                              ^~~~
a.cc:21:29: error: 'strcmp' was not declared in this scope
   21 |                         if (strcmp(char[j][],char[j+1][]))
      |                             ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdio.h>
  +++ |+#include <cstring>
    3 | 
a.cc:22:33: error: 'swap' was not declared in this scope
   22 |                                 swap(j,j+1);
      |                                 ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

bool cmp(string a,string b)
{return a<b;}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: 'cmp' was not declared in this scope; did you mean 'bcmp'?
   19 |   sort(v.begin(),v.end(),cmp);
      |                          ^~~
      |                          bcmp
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
    vector <string> msg;
    int n, l;
    cin >> n >> l;
    while (--n) {
        string a;
        cin >> a;
        msg.push_back(a);
    }
    msg.sort();
  string re = "";
  for (auto i: msg) {
    re+=i;}
  cout<< re;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'sort'
   17 |     msg.sort();
      |         ^~~~
Language: C++

#inclede<bits/stdc++.h>
using namespace std;
int main(){
  int N,L;
  cin >> N >> L ;
  vector<string> data(N) ;
  for(int i=0; i<N ;i++){
    cin >> data.at(i);
  }
  sort(data.begin(),data.end());
  for(int i=0; i<N ;i++){
    cout << data.at(i);
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclede; did you mean #include?
    1 | #inclede<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N >> L ;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclede<bits/stdc++.h>
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<string> data(N) ;
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #inclede<bits/stdc++.h>
a.cc:6:10: error: 'string' was not declared in this scope
    6 |   vector<string> data(N) ;
      |          ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inclede<bits/stdc++.h>
a.cc:6:18: error: 'data' was not declared in this scope
    6 |   vector<string> data(N) ;
      |                  ^~~~
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(data.begin(),data.end());
      |   ^~~~
      |   short
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << data.at(i);
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

import java.util.*;
public class test
{
public static void main(String[] args)
{
 
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
  int l=sc.nextInt();
  ArrayList<String> ar=new ArrayList<String>();
  for(int i=0;i<n;i++)
    ar.add(sc.next());
  Collections.sort(ar);
  for(int i=0;i<n;i++)
    System.out.print(ar.get(i));
}}

Compiler output:
Main.java:2: error: class test is public, should be declared in a file named test.java
public class test
       ^
1 error