Language: C++

#include<cstdio>
#include<cstring>
using namespace std;

int main(){
	char A,B;
	scanf("%s %s",&A,&B);
	int lenA = strlen(A);
	int lenB = strlen(B);

	if(lenA > lenB) printf("GREATER");
	if(lenA < lenB) printf("LESS");
	if(lenA == lenB){
		if(strcmp(A) > strcmp(B)) printf("GREATER");
		if(strcmp(A) < strcmp(B)) printf("LESS");
		if(strcmp(A) == strcmp(B)) printf("EQUAL");
	}

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |         int lenA = strlen(A);
      |                           ^
      |                           |
      |                           char
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:9:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    9 |         int lenB = strlen(B);
      |                           ^
      |                           |
      |                           char
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:14:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   14 |                 if(strcmp(A) > strcmp(B)) printf("GREATER");
      |                           ^
      |                           |
      |                           char
a.cc:14:26: error: too few arguments to function 'int strcmp(const char*, const char*)'
   14 |                 if(strcmp(A) > strcmp(B)) printf("GREATER");
      |                    ~~~~~~^~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
a.cc:14:39: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   14 |                 if(strcmp(A) > strcmp(B)) printf("GREATER");
      |                                       ^
      |                                       |
      |                                       char
a.cc:14:38: error: too few arguments to function 'int strcmp(const char*, const char*)'
   14 |                 if(strcmp(A) > strcmp(B)) printf("GREATER");
      |                                ~~~~~~^~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
a.cc:15:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |                 if(strcmp(A) < strcmp(B)) printf("LESS");
      |                           ^
      |                           |
      |                           char
a.cc:15:26: error: too few arguments to function 'int strcmp(const char*, const char*)'
   15 |                 if(strcmp(A) < strcmp(B)) printf("LESS");
      |                    ~~~~~~^~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
a.cc:15:39: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |                 if(strcmp(A) < strcmp(B)) printf("LESS");
      |                                       ^
      |                                       |
      |                                       char
a.cc:15:38: error: too few arguments to function 'int strcmp(const char*, const char*)'
   15 |                 if(strcmp(A) < strcmp(B)) printf("LESS");
      |                                ~~~~~~^~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
a.cc:16:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |                 if(strcmp(A) == strcmp(B)) printf("EQUAL");
      |                           ^
      |                           |
      |                           char
a.cc:16:26: error: too few arguments to function 'int strcmp(const char*, const char*)'
   16 |                 if(strcmp(A) == strcmp(B)) printf("EQUAL");
      |                    ~~~~~~^~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
a.cc:16:40: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |                 if(strcmp(A) == strcmp(B)) printf("EQUAL");
      |                                        ^
      |                                        |
      |                                        char
a.cc:16:39: error: too few arguments to function 'int strcmp(const char*, const char*)'
   16 |                 if(strcmp(A) == strcmp(B)) printf("EQUAL");
      |                                 ~~~~~~^~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~