Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main(){
    char s,p,copy;
    scanf("%c %c",s,p);
    strcpy(copy,s);
    strcat(copy,s);
    if(strstr(copy,p)== NULL) printf("%c", No);
    else print("%c", Yes)
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: invalid conversion from 'char' to 'char*' [-fpermissive]
    8 |     strcpy(copy,s);
      |            ^~~~
      |            |
      |            char
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/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:8:17: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |     strcpy(copy,s);
      |                 ^
      |                 |
      |                 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:9:12: error: invalid conversion from 'char' to 'char*' [-fpermissive]
    9 |     strcat(copy,s);
      |            ^~~~
      |            |
      |            char
/usr/include/string.h:149:39: note:   initializing argument 1 of 'char* strcat(char*, const char*)'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:9:17: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    9 |     strcat(copy,s);
      |                 ^
      |                 |
      |                 char
/usr/include/string.h:149:70: note:   initializing argument 2 of 'char* strcat(char*, const char*)'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:10:14: error: no matching function for call to 'strstr(char&, char&)'
   10 |     if(strstr(copy,p)== NULL) printf("%c", No);
      |        ~~~~~~^~~~~~~~
/usr/include/string.h:330:14: note: candidate: 'char* strstr(char*, const char*)' (near match)
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |              ^~~~~~
/usr/include/string.h:330:14: note:   conversion of argument 2 would be ill-formed:
a.cc:10:20: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   10 |     if(strstr(copy,p)== NULL) printf("%c", No);
      |                    ^
      |                    |
      |                    char
/usr/include/string.h:332:20: note: candidate: 'const char* strstr(const char*, const char*)' (near match)
  332 | extern const char *strstr (const char *__haystack, const char *__needle)
      |                    ^~~~~~
/usr/include/string.h:332:20: note:   conversion of argument 2 would be ill-formed:
a.cc:10:20: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   10 |     if(strstr(copy,p)== NULL) printf("%c", No);
      |                    ^
      |                    |
      |                    char
a.cc:10:44: error: 'No' was not declared in this scope
   10 |     if(strstr(copy,p)== NULL) printf("%c", No);
      |                                            ^~
a.cc:11:22: error: 'Yes' was not declared in this scope
   11 |     else print("%c", Yes)
      |                      ^~~
a.cc:11:10: error: 'print' was not declared in this scope; did you mean 'printf'?
   11 |     else print("%c", Yes)
      |          ^~~~~
      |          printf