Code bị lỗi "'strcmpi': cannot convert parameter 2 from 'bool' to 'const char *'"

error C2664: 'strcmpi' : cannot convert parameter 2 from 'bool' to 'const char *'

mình trả về kiểu char mà có gì sai mà nó ko nhận ?

char *dem(char a[])
{
	char *copy=strtok(a," ");//space dừng >> kí tự/space/NULL
	int i=0;
	char paste[5][10];
	while(copy!='\0')
	{
		strcpy(paste[i],copy);
		i++;
		copy=strtok('\0'," ");
	}
	return paste[1];
}


void tang_ten_ho(SV a[],int c)
{
	for(int i=0;i<c-1;i++)
		for(int j=i+1;j<c;j++)
		{
			if(strcmpi(dem(a[i].HoLot),dem(a[j].HoLot)>0))
				swap(a[i],a[j]);
		}		
}

Sai ngoặc chỗ này nè

if(strcmpi(dem(a[i].HoLot),dem(a[j].HoLot)) > 0)
2 Likes
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?