Language: C

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

typedef struct{
	char name[11]:
	int p;
	int label;
}set;

	set a[101];

//nameによるソート
int compare(const set *a,const set *b){
	return strcmp(a->name,b->name);
}

int main(){
	//input
	int n;
	scanf("%d",&n);
	//構造体にinput
	for(int i=0;i<n;i++){
		scanf("%s %d",a[i].name,&a[i].p);
		a[i].label=i+1;
	}
	
	//void qsort(先頭要素のポインタ,要素数,一つの要素のサイズ,比較方法);
	//stdlib.hに入っている
	//compareには、aがbよりも先であるとき負の値を返すような関数を入れる必要がある
	qsort(a,n,sizeof(set),compare);
	
	//同名をpointでソート
	for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(strcmp(a[i].name,a[j].name)==0&&a[i].p<a[j].p){
                set tmp=a[i];
                a[i]=a[j];
                a[j]=tmp;
            }
        }
    }
	
    for(int i=0;i<n;i++)printf("%d\n",a[i].label);
	
	return 0;
}

Compiler output:
main.c:7:9: error: expected expression before 'int'
    7 |         int p;
      |         ^~~
main.c:6:14: error: bit-field 'name' width not an integer constant
    6 |         char name[11]:
      |              ^~~~
main.c:6:14: error: bit-field 'name' has invalid type
main.c: In function 'compare':
main.c:15:24: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   15 |         return strcmp(a->name,b->name);
      |                       ~^~~~~~
      |                        |
      |                        unsigned char:1
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'unsigned char:1'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:15:32: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   15 |         return strcmp(a->name,b->name);
      |                               ~^~~~~~
      |                                |
      |                                unsigned char:1
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'unsigned char:1'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c: In function 'main':
main.c:24:46: error: 'set' has no member named 'p'
   24 |                 scanf("%s %d",a[i].name,&a[i].p);
      |                                              ^
main.c:25:21: error: 'set' has no member named 'label'
   25 |                 a[i].label=i+1;
      |                     ^
main.c:31:31: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   31 |         qsort(a,n,sizeof(set),compare);
      |                               ^~~~~~~
      |                               |
      |                               int (*)(const set *, const set *)
In file included from main.c:3:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(const set *, const set *)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
main.c:36:27: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   36 |             if(strcmp(a[i].name,a[j].name)==0&&a[i].p<a[j].p){
      |                       ~~~~^~~~~
      |                           |
      |                           unsigned char:1
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'unsigned char:1'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:36:37: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   36 |             if(strcmp(a[i].name,a[j].name)==0&&a[i].p<a[j].p){
      |                                 ~~~~^~~~~
      |                                     |
      |                                     unsigned char:1
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'unsigned char:1'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:36:52: error: 'set' has no member named 'p'
   36 |             if(strcmp(a[i].name,a[j].name)==0&&a[i].p<a[j].p){
      |                                                    ^
main.c:36:59: error: 'set' has no member named 'p'
   36 |             if(strcmp(a[i].name,a[j].name)==0&&a[i].p<a[j].p){
      |                                                           ^
main.c:44:43: error: 'set' has no member named 'label'
   44 |     for(int i=0;i<n;i++)printf("%d\n",a[i].label);
      |                                           ^