Language: C++

#include<bits/stdc++.h>
using namespace std;
#include <string>
struct Data{
        int ex_pos;
        int num;
    }
int main(){
    unsigned long long ans =0; 
    int N;
    cin >> N ;
    char[10][N] s;
    Data[N] val;
    for(int i =0; i< N ; i++){
        val[i].ex_pos =i;
    }
    for (int i = 0; i < N; i++) {
        val[i] = 0;
    }
    for(int i=0;i<N;i++){
        for(int j =0;j<1=10;j++){
            cin >> (int)s[i][j];
            for(int k=0;k<10;k++){
                val[i] += s[i][j];
            }
        }
    } 
    sort(val.num , val.num+N);
    for(int i=0 ; i<N-1 ;i++){
        if(val[i].num==val[i+1].num){
            int t[10];
            int r[10];
            for(int j=0 ;j <10 ; j++){
                t[j]=s[val[i].ex_pos][j];
                r[j]=s[val[i+1].ex_pos][j];
                
            }
            sort(t,t+10);
            sort(r,r+10);
            for(int j=0 ;j <10 ; j++){
                if (t[j]==r[j]) {
                    if(j==N){
                        ans++;
                    }
                }else{break;}
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc:7:6: error: expected ';' after struct definition
    7 |     }
      |      ^
      |      ;
a.cc: In function 'int main()':
a.cc:12:10: error: expected identifier before numeric constant
   12 |     char[10][N] s;
      |          ^~
a.cc:12:10: error: expected ']' before numeric constant
   12 |     char[10][N] s;
      |          ^~
      |          ]
a.cc:12:9: error: structured binding declaration cannot have type 'char'
   12 |     char[10][N] s;
      |         ^
a.cc:12:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:12:9: error: empty structured binding declaration
a.cc:12:13: error: expected initializer before '[' token
   12 |     char[10][N] s;
      |             ^
a.cc:13:9: error: structured binding declaration cannot have type 'Data'
   13 |     Data[N] val;
      |         ^~~
a.cc:13:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:10: error: conflicting declaration 'auto N'
   13 |     Data[N] val;
      |          ^
a.cc:10:9: note: previous declaration as 'int N'
   10 |     int N;
      |         ^
a.cc:13:13: error: expected initializer before 'val'
   13 |     Data[N] val;
      |             ^~~
a.cc:15:9: error: 'val' was not declared in this scope
   15 |         val[i].ex_pos =i;
      |         ^~~
a.cc:18:9: error: 'val' was not declared in this scope
   18 |         val[i] = 0;
      |         ^~~
a.cc:21:23: error: lvalue required as left operand of assignment
   21 |         for(int j =0;j<1=10;j++){
      |                      ~^~
a.cc:22:25: error: 's' was not declared in this scope
   22 |             cin >> (int)s[i][j];
      |                         ^
a.cc:24:17: error: 'val' was not declared in this scope
   24 |                 val[i] += s[i][j];
      |                 ^~~
a.cc:28:10: error: 'val' was not declared in this scope
   28 |     sort(val.num , val.num+N);
      |          ^~~
a.cc:34:22: error: 's' was not declared in this scope
   34 |                 t[j]=s[val[i].ex_pos][j];
      |                      ^