Language: C++

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

int main()
{
  int i,j,N;
  int m=0;
  cin >> N;
  char* moji[N][30], tmp[30];
  int* num[N];
  for(i=0;i<N;i++){
    scanf("%s",moji[i]);
    scanf("%d",num[i]);
  }
  for(i=1;i<N;i++){
    for(j=1;j<N;j++){
      if(strcmp(moji[j-1],moji[j])>0){
        strcpy(tmp,moji[j-1]);
        for(int h=1;h<N;h++){
          strcpy(moji[h-1],moji[h]);
        }
        strcpy(moji[N-1],tmp)+
      }
      if(strcmp(moji[j-1],moji[j])==0){
        if(num[j-1]<num[j]){
          m=num[j-1];
          num[j-1]=num[j];
          num[j]=m;
        }
      }
    }
    for(i=0;i<N;i++){
      printf("%s%d\n",moji[i],num[i]);
    }
  }
          
      


Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: cannot convert 'char**' to 'const char*'
   17 |       if(strcmp(moji[j-1],moji[j])>0){
      |                 ~~~~~~~~^
      |                         |
      |                         char**
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/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:18:28: error: cannot convert 'char**' to 'const char*'
   18 |         strcpy(tmp,moji[j-1]);
      |                    ~~~~~~~~^
      |                            |
      |                            char**
/usr/include/string.h:141:70: note:   initializing argument 2 of 'char* strcpy(char*, const char*)'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:20:26: error: cannot convert 'char**' to 'char*'
   20 |           strcpy(moji[h-1],moji[h]);
      |                  ~~~~~~~~^
      |                          |
      |                          char**
/usr/include/string.h:141:39: note:   initializing argument 1 of 'char* strcpy(char*, const char*)'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:22:24: error: cannot convert 'char**' to 'char*'
   22 |         strcpy(moji[N-1],tmp)+
      |                ~~~~~~~~^
      |                        |
      |                        char**
/usr/include/string.h:141:39: note:   initializing argument 1 of 'char* strcpy(char*, const char*)'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:23:7: error: expected primary-expression before '}' token
   23 |       }
      |       ^
a.cc:24:25: error: cannot convert 'char**' to 'const char*'
   24 |       if(strcmp(moji[j-1],moji[j])==0){
      |                 ~~~~~~~~^
      |                         |
      |                         char**
/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:26:20: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   26 |           m=num[j-1];
      |             ~~~~~~~^
      |                    |
      |                    int*
a.cc:28:18: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   28 |           num[j]=m;
      |                  ^
      |                  |
      |                  int
a.cc:35:4: error: expected '}' at end of input
   35 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^