criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>
 
void main(){
  int S;
  scanf("%d", &S);
  
if(S==SUN)return 7;
  else if(S==MON)return 6;
  else if(S==TUE)return 5;
  else if(S==WED)return 4;
  else if(S==THU)return 3;
  else if(S==FRI)return 2;
  else if(S==SUN)return 7;
  
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:7: error: 'SUN' undeclared (first use in this function)
    7 | if(S==SUN)return 7;
      |       ^~~
main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:18: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 | if(S==SUN)return 7;
      |                  ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:8:14: error: 'MON' undeclared (first use in this function)
    8 |   else if(S==MON)return 6;
      |              ^~~
main.c:8:25: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    8 |   else if(S==MON)return 6;
      |                         ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:9:14: error: 'TUE' undeclared (first use in this function)
    9 |   else if(S==TUE)return 5;
      |              ^~~
main.c:9:25: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |   else if(S==TUE)return 5;
      |                         ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:10:14: error: 'WED' undeclared (first use in this function)
   10 |   else if(S==WED)return 4;
      |              ^~~
main.c:10:25: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   10 |   else if(S==WED)return 4;
      |                         ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:11:14: error: 'THU' undeclared (first use in this function)
   11 |   else if(S==THU)return 3;
      |              ^~~
main.c:11:25: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   11 |   else if(S==THU)return 3;
      |                         ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:12:14: error: 'FRI' undeclared (first use in this function)
   12 |   else if(S==FRI)return 2;
      |              ^~~
main.c:12:25: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   12 |   else if(S==FRI)return 2;
      |                         ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:13:25: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |   else if(S==SUN)return 7;
      |                         ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:15:9: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   15 |  return 0;
      |         ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
Language: C++

int main()
{
    map<string, int> m;
    string dayarray[7] = {"SAT","FRI","THU","WED","TUE","MON","SUN"};
    for(int i = 1; i <= 7; ++i) {
        m[dayarray[i]] = i;
    }
    string s;
    cin >> s;
    cout << m[s];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'map' was not declared in this scope
    3 |     map<string, int> m;
      |     ^~~
a.cc:3:9: error: 'string' was not declared in this scope
    3 |     map<string, int> m;
      |         ^~~~~~
a.cc:3:17: error: expected primary-expression before 'int'
    3 |     map<string, int> m;
      |                 ^~~
a.cc:4:11: error: expected ';' before 'dayarray'
    4 |     string dayarray[7] = {"SAT","FRI","THU","WED","TUE","MON","SUN"};
      |           ^~~~~~~~~
      |           ;
a.cc:6:9: error: 'm' was not declared in this scope
    6 |         m[dayarray[i]] = i;
      |         ^
a.cc:6:11: error: 'dayarray' was not declared in this scope
    6 |         m[dayarray[i]] = i;
      |           ^~~~~~~~
a.cc:8:11: error: expected ';' before 's'
    8 |     string s;
      |           ^~
      |           ;
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> s;
      |     ^~~
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s;
      |            ^
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << m[s];
      |     ^~~~
a.cc:10:13: error: 'm' was not declared in this scope
   10 |     cout << m[s];
      |             ^
Language: C++

#include <stdio.h>
#include<string.h>
int main() {
	char day[4];
	scanf("%s", day);

	if (strcmp(day, 'SUN')
	{
		printf("%d", 7);
	}
	if (strcmp(day, 'MON')
	{
		printf("%d", 6);
	}
	if (strcmp(day, 'TUE')
	{
		printf("%d", 5);
	}
	if (strcmp(day, 'WED')
	{
		printf("%d", 4);
	}
	if (strcmp(day, 'THU')
	{
		printf("%d", 3);
	}
	if (strcmp(day, 'FRI')
	{
		printf("%d", 2);
	}
	if (strcmp(day, 'SAT')
	{
		printf("%d", 1);
	}
}
		

Compiler output:
a.cc:7:25: warning: multi-character character constant [-Wmultichar]
    7 |         if (strcmp(day, 'SUN')
      |                         ^~~~~
a.cc:11:25: warning: multi-character character constant [-Wmultichar]
   11 |         if (strcmp(day, 'MON')
      |                         ^~~~~
a.cc:15:25: warning: multi-character character constant [-Wmultichar]
   15 |         if (strcmp(day, 'TUE')
      |                         ^~~~~
a.cc:19:25: warning: multi-character character constant [-Wmultichar]
   19 |         if (strcmp(day, 'WED')
      |                         ^~~~~
a.cc:23:25: warning: multi-character character constant [-Wmultichar]
   23 |         if (strcmp(day, 'THU')
      |                         ^~~~~
a.cc:27:25: warning: multi-character character constant [-Wmultichar]
   27 |         if (strcmp(day, 'FRI')
      |                         ^~~~~
a.cc:31:25: warning: multi-character character constant [-Wmultichar]
   31 |         if (strcmp(day, 'SAT')
      |                         ^~~~~
a.cc: In function 'int main()':
a.cc:7:25: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    7 |         if (strcmp(day, 'SUN')
      |                         ^~~~~
      |                         |
      |                         int
In file included from a.cc:2:
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:7:31: error: expected ')' before '{' token
    7 |         if (strcmp(day, 'SUN')
      |            ~                  ^
      |                               )
    8 |         {
      |         ~                      
a.cc:35:1: error: expected primary-expression before '}' token
   35 | }
      | ^
Language: C++

#include <stdio.h>
#include<string.h>
int main(void) {
	char day[4];
	scanf("%s", day);

	if (!strcmp(day, 'SUN')
	{
		printf("%d", 7);
	}
	if (!strcmp(day, 'MON')
	{
		printf("%d", 6);
	}
	if (!strcmp(day, 'TUE')
	{
		printf("%d", 5);
	}
	if (!strcmp(day, 'WED')
	{
		printf("%d", 4);
	}
	if (!strcmp(day, 'THU')
	{
		printf("%d", 3);
	}
	if (!strcmp(day, 'FRI')
	{
		printf("%d", 2);
	}
	if (!strcmp(day, 'SAT')
	{
		printf("%d", 1);
	}
}
		


Compiler output:
a.cc:7:26: warning: multi-character character constant [-Wmultichar]
    7 |         if (!strcmp(day, 'SUN')
      |                          ^~~~~
a.cc:11:26: warning: multi-character character constant [-Wmultichar]
   11 |         if (!strcmp(day, 'MON')
      |                          ^~~~~
a.cc:15:26: warning: multi-character character constant [-Wmultichar]
   15 |         if (!strcmp(day, 'TUE')
      |                          ^~~~~
a.cc:19:26: warning: multi-character character constant [-Wmultichar]
   19 |         if (!strcmp(day, 'WED')
      |                          ^~~~~
a.cc:23:26: warning: multi-character character constant [-Wmultichar]
   23 |         if (!strcmp(day, 'THU')
      |                          ^~~~~
a.cc:27:26: warning: multi-character character constant [-Wmultichar]
   27 |         if (!strcmp(day, 'FRI')
      |                          ^~~~~
a.cc:31:26: warning: multi-character character constant [-Wmultichar]
   31 |         if (!strcmp(day, 'SAT')
      |                          ^~~~~
a.cc: In function 'int main()':
a.cc:7:26: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    7 |         if (!strcmp(day, 'SUN')
      |                          ^~~~~
      |                          |
      |                          int
In file included from a.cc:2:
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:7:32: error: expected ')' before '{' token
    7 |         if (!strcmp(day, 'SUN')
      |            ~                   ^
      |                                )
    8 |         {
      |         ~                       
a.cc:35:1: error: expected primary-expression before '}' token
   35 | }
      | ^
Language: C

using namespace std;
#include <stdio.h>

int main(void)
{

    char mj1[100];
    int i = 0;

    scanf("%s", mj1);

    if (mj1[i] == 'S')
    {
        i++;
        if (mj1[i] == 'U')
        {
            printf("7");

            if (mj1[i] == 'A')
            {
                printf("1");
            }
        }
    }
    if (mj1[i] == 'T')
    {
        i++;
        if (mj1[i] == 'U')
        {
            printf("5\n");
        }
        if (mj1[i] == 'H')
        {
            printf("3\n");
        }
    }
    if (mj1[i] == 'M')
    {
        printf("6\n");
    }
    if (mj1[i] == 'W')
    {
        printf("4\n");
    }
    if (mj1[i] == 'F')
    {
        printf("2\n");
    }

    return 0;
}


Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using namespace std;
      | ^~~~~
main.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    1 | using namespace std;
      |                 ^~~
Language: C++

#include<cstdio>
#include<vector>
#include<string>
#include <iostream> 

using namespace std;
 
int main(){
  string st;
  int i;
  string <vector> week[7];
  
  week[0]="SUN";
  week[1]="MON";
  week[2]="TUE";
  week[3]="WED";
  week[4]="THU";
  week[5]="FRI";
  week[6]="SAT";
 
  
  cin >> st;
  for(i=0;week[i]!=st;i++);
   
  cout << week[(i+2)%7];
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not a template
   11 |   string <vector> week[7];
      |   ^~~~~~
Language: C++

#include <stdio.h>

int main(void) {
	char day[4];
	scanf("%s", day);

	if (!strcmp(day, 'SUN')
	{
		printf("%d", 7);
	}
	if (!strcmp(day, 'MON')
	{
		printf("%d", 6);
	}
	if (!strcmp(day, 'TUE')
	{
		printf("%d", 5);
	}
	if (!strcmp(day, 'WED')
	{
		printf("%d", 4);
	}
	if (!strcmp(day, 'THU')
	{
		printf("%d", 3);
	}
	if (!strcmp(day, 'FRI')
	{
		printf("%d", 2);
	}
	if (!strcmp(day, 'SAT')
	{
		printf("%d", 1);
	}
}
		

Compiler output:
a.cc:7:26: warning: multi-character character constant [-Wmultichar]
    7 |         if (!strcmp(day, 'SUN')
      |                          ^~~~~
a.cc:11:26: warning: multi-character character constant [-Wmultichar]
   11 |         if (!strcmp(day, 'MON')
      |                          ^~~~~
a.cc:15:26: warning: multi-character character constant [-Wmultichar]
   15 |         if (!strcmp(day, 'TUE')
      |                          ^~~~~
a.cc:19:26: warning: multi-character character constant [-Wmultichar]
   19 |         if (!strcmp(day, 'WED')
      |                          ^~~~~
a.cc:23:26: warning: multi-character character constant [-Wmultichar]
   23 |         if (!strcmp(day, 'THU')
      |                          ^~~~~
a.cc:27:26: warning: multi-character character constant [-Wmultichar]
   27 |         if (!strcmp(day, 'FRI')
      |                          ^~~~~
a.cc:31:26: warning: multi-character character constant [-Wmultichar]
   31 |         if (!strcmp(day, 'SAT')
      |                          ^~~~~
a.cc: In function 'int main()':
a.cc:7:14: error: 'strcmp' was not declared in this scope
    7 |         if (!strcmp(day, 'SUN')
      |              ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | 
a.cc:7:32: error: expected ')' before '{' token
    7 |         if (!strcmp(day, 'SUN')
      |            ~                   ^
      |                                )
    8 |         {
      |         ~                       
a.cc:35:1: error: expected primary-expression before '}' token
   35 | }
      | ^
Language: C++

#include<cstdio>
#include<vector>
#include<string>
 
using namespace std;
 
int main(){
  string st;
  int i;
  string week[7];
  
  week[0]="SUN";
  week[1]="MON";
  week[2]="TUE";
  week[3]="WED";
  week[4]="THU";
  week[5]="FRI";
  week[6]="SAT";
 
  
  cin >> st;
  for(i=0;week[i]!=st;i++);
   
  cout << week[(i+2)%7];
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'cin' was not declared in this scope
   21 |   cin >> st;
      |   ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<string>
  +++ |+#include <iostream>
    4 | 
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << week[(i+2)%7];
      |   ^~~~
a.cc:24:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

import java.util.*;
class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        Long a = sc.nextLong();
        Long b = sc.nextLong();
        Long x = sc.nextLong();
        System.out.println(ret(a,b,x));
        sc.close();
    }
    static Long ret(Long a,Long b, Long x){
        Long wk = 0L;
        Long ret = 0L;
      	if((a * wk + b * (String.valueOf(wk).length())) < x){
            for(Long i = 0L; ;i++){
                wk = a * i + b * (String.valueOf(i).length());
                if(wk > x){
                    return i -1; 
                }
            }
        }else{
            return ret;
        }
        return ret;
    }
}

Compiler output:
Main.java:24: error: unreachable statement
        return ret;
        ^
1 error
Language: C++

#include <stdio.h>

int main(void) {
	char day[4];
	scanf("%s", day);

	if (strcmp(day, 'SUN')
	{
		printf("%d", 7);
	}
	if (strcmp(day, 'MON')
	{
		printf("%d", 6);
	}
	if (strcmp(day, 'TUE')
	{
		printf("%d", 5);
	}
	if (strcmp(day, 'WED')
	{
		printf("%d", 4);
	}
	if (strcmp(day, 'THU')
	{
		printf("%d", 3);
	}
	if (strcmp(day, 'FRI')
	{
		printf("%d", 2);
	}
	if (strcmp(day, 'SAT')
	{
		printf("%d", 1);
	}
}
		

Compiler output:
a.cc:7:25: warning: multi-character character constant [-Wmultichar]
    7 |         if (strcmp(day, 'SUN')
      |                         ^~~~~
a.cc:11:25: warning: multi-character character constant [-Wmultichar]
   11 |         if (strcmp(day, 'MON')
      |                         ^~~~~
a.cc:15:25: warning: multi-character character constant [-Wmultichar]
   15 |         if (strcmp(day, 'TUE')
      |                         ^~~~~
a.cc:19:25: warning: multi-character character constant [-Wmultichar]
   19 |         if (strcmp(day, 'WED')
      |                         ^~~~~
a.cc:23:25: warning: multi-character character constant [-Wmultichar]
   23 |         if (strcmp(day, 'THU')
      |                         ^~~~~
a.cc:27:25: warning: multi-character character constant [-Wmultichar]
   27 |         if (strcmp(day, 'FRI')
      |                         ^~~~~
a.cc:31:25: warning: multi-character character constant [-Wmultichar]
   31 |         if (strcmp(day, 'SAT')
      |                         ^~~~~
a.cc: In function 'int main()':
a.cc:7:13: error: 'strcmp' was not declared in this scope
    7 |         if (strcmp(day, 'SUN')
      |             ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | 
a.cc:7:31: error: expected ')' before '{' token
    7 |         if (strcmp(day, 'SUN')
      |            ~                  ^
      |                               )
    8 |         {
      |         ~                      
a.cc:35:1: error: expected primary-expression before '}' token
   35 | }
      | ^
Language: C++

#include<cstdio>
#include<vector>
#include<string>
 
using namespace std;
 
int main(){
  string st;
  int i;
  string <vector> week[7];
  
  week[0]="SUN";
  week[1]="MON";
  week[2]="TUE";
  week[3]="WED";
  week[4]="THU";
  week[5]="FRI";
  week[6]="SAT";
 
  
  cin >> st;
  for(i=0;week[i]!=st;i++);
   
  cout << week[(i+2)%7];
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not a template
   10 |   string <vector> week[7];
      |   ^~~~~~
a.cc:21:3: error: 'cin' was not declared in this scope
   21 |   cin >> st;
      |   ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<string>
  +++ |+#include <iostream>
    4 | 
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << week[(i+2)%7];
      |   ^~~~
a.cc:24:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
using namespaces std;
int main()
{
  String s;
  String a[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
  cin>>s;
  for(int i=0;i<7;i++){
  	if(s==a[i]){
    cout<<(7-i)<<endl;
    }
  }
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'String' was not declared in this scope
    5 |   String s;
      |   ^~~~~~
a.cc:6:9: error: expected ';' before 'a'
    6 |   String a[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |         ^~
      |         ;
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>s;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
a.cc:9:15: error: 'a' was not declared in this scope
    9 |         if(s==a[i]){
      |               ^
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout<<(7-i)<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     cout<<(7-i)<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<cstdio>
#include<vector>
#include<string>
 
using namespace std;
string<vector> week[7];

int main(){
  string st;
  int i;
  week[0]="SUN";
  week[1]="MON";
  week[2]="TUE";
  week[3]="WED";
  week[4]="THU";
  week[5]="FRI";
  week[6]="SAT";
 
  
  cin >> st;
  for(i=0;week[i]!=st;i++);
   
  cout << week[(i+2)%7];
    
}

Compiler output:
a.cc:6:1: error: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not a template
    6 | string<vector> week[7];
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:20:3: error: 'cin' was not declared in this scope
   20 |   cin >> st;
      |   ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<string>
  +++ |+#include <iostream>
    4 | 
a.cc:23:3: error: 'cout' was not declared in this scope
   23 |   cout << week[(i+2)%7];
      |   ^~~~
a.cc:23:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rept(i,k,n) for(int i = (k); i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define Sort(v) sort(v.begin(),v.end())
#define Reverse(v) reverse(v.begin(),v.end())

typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<long long,long long> Pdd;

int main() {
    string s;
    cin>>s;
    int a;
    if(s=="SUN") a=7;
    if(s=="MON") a=6;
    if(s=="TUE") a=5;
    if(s=="WED") a=4;
    if(s=="THU") a=3;
    if(s=="FRI") a=2;
    if(s=="SAT") a=1;
    cout<<a;


}
    return 0;
}

Compiler output:
a.cc:29:5: error: expected unqualified-id before 'return'
   29 |     return 0;
      |     ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include<iostream>
#include<sstream>
#include<vector>
#include<iterator>
using namespace std;

int main(void)
{
    string S;
    cin >> S;

    vector<string> day = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
    int index = find(day.begin(), day.end(), S) - day.begin();

    cout << 7 - index << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   13 |     int index = find(day.begin(), day.end(), S) - day.begin();
      |                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:13:21: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   13 |     int index = find(day.begin(), day.end(), S) - day.begin();
      |                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C


#include <stdio.h>
#include <math.h>
 
int main(void)
{
  int i,j;
  long double keta1;
  long long X,A,B,ten=1,amari;
  char str[64];
  fgets(str,sizeof(str),stdin);
  sscanf(str,"%lld,%lld,%lld",&A,&B,&X);
  //桁を決める
  keta1 = long double log10l((long double)X);
  i =ceil(keta1);
  while(i>0)
  {
    ten = 0;
    for(j=0;j<i-1;j++)
    {
    	ten *= 10;
    }
    if((ten+B*i) <= X)
      break;
  }
  if(i == 0)
  {
    puts("0");
  }else
  //B側のみ計算し引き算
  {
    X -= B*i;
  //Aでの商を出力
    amari = X % A;
    X -= amari;
    printf("%lld",X/A);
  }
  return 0;

Compiler output:
main.c: In function 'main':
main.c:14:11: error: expected expression before 'long'
   14 |   keta1 = long double log10l((long double)X);
      |           ^~~~
main.c:38:3: error: expected declaration or statement at end of input
   38 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>

int main(void)
{

    char mj1[5];
    int i=0;

    scanf("%s", mj1);

  
        if (mj1[i] == 'S')
        {
            i++;
            if (mj1[i] == 'U')
            {
                printf("7");
                break;
                if (mj1[i] == 'A')
                {
                    printf("1");
                    break;
                }
            }
        }
        if (mj1[i] == 'T')
        {
            i++;
            if (mj1[i] == 'U')
            {
                printf("5\n");
                break;
            }
            if (mj1[i] == 'H')
            {
                printf("3\n");
                break;
            }
        }
        if (mj1[i] == 'M')
        {
            printf("6\n");
            break;
        }
        if (mj1[i] == 'W')
        {
            printf("4\n");
            break;
        }
        if (mj1[i] == 'F')
        {
            printf("2\n");
            break;
        }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:17: error: break statement not within loop or switch
   18 |                 break;
      |                 ^~~~~
main.c:22:21: error: break statement not within loop or switch
   22 |                     break;
      |                     ^~~~~
main.c:32:17: error: break statement not within loop or switch
   32 |                 break;
      |                 ^~~~~
main.c:37:17: error: break statement not within loop or switch
   37 |                 break;
      |                 ^~~~~
main.c:43:13: error: break statement not within loop or switch
   43 |             break;
      |             ^~~~~
main.c:48:13: error: break statement not within loop or switch
   48 |             break;
      |             ^~~~~
main.c:53:13: error: break statement not within loop or switch
   53 |             break;
      |             ^~~~~
Language: C++

#include <iostream>
using namespace std; 
 
int main()
{
  string S;
  int day;
  cin >> S;
  
  switch(S)
  {
    case "SUN":
      day = 7;
      break;
    case "MON":
      day = 6;
      break;
    case "TUE":
      day = 5;
      break;
    case "WED":
      day = 4;
      break;
    case "THU":
      day = 3;
      break;
    case "FRI":
      day = 2;
      break;
    case "SAT":
      day = 1;
      break;
  }
  
  cout << day << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: switch quantity not an integer
   10 |   switch(S)
      |          ^
Language: C++

#include <iostream>
using namespace std; 
 
int main()
{
  std::String S;
  int day;
  std::cin >> S;
  
  switch(S)
  {
    case "SUN":
      day = 7;
      break;
    case "MON":
      day = 6;
      break;
    case "TUE":
      day = 5;
      break;
    case "WED":
      day = 4;
      break;
    case "THU":
      day = 3;
      break;
    case "FRI":
      day = 2;
      break;
    case "SAT":
      day = 1;
      break;
  }
  
  std::cout << day << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'String' is not a member of 'std'; did you mean 'string'?
    6 |   std::String S;
      |        ^~~~~~
      |        string
a.cc:8:15: error: 'S' was not declared in this scope
    8 |   std::cin >> S;
      |               ^
Language: Java

import java.util.Scanner;

public class p1 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String[] arr = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
		
		String input = sc.next();
		
		int tmp = 0;
		for(String i: arr) {
			if(input.equals(i)) {
				System.out.println(7-tmp);
				return;
			}
			
			tmp++;
		}
	}
}

Compiler output:
Main.java:3: error: class p1 is public, should be declared in a file named p1.java
public class p1 {
       ^
1 error
Language: C++

l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
s = input()
ind = l.index(s)
if ind == 7:
    print(7)
else:
    print(7-ind)

Compiler output:
a.cc:1:6: warning: multi-character character constant [-Wmultichar]
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |      ^~~~~
a.cc:1:12: warning: multi-character character constant [-Wmultichar]
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |            ^~~~~
a.cc:1:18: warning: multi-character character constant [-Wmultichar]
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                  ^~~~~
a.cc:1:24: warning: multi-character character constant [-Wmultichar]
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                        ^~~~~
a.cc:1:30: warning: multi-character character constant [-Wmultichar]
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                              ^~~~~
a.cc:1:36: warning: multi-character character constant [-Wmultichar]
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                                    ^~~~~
a.cc:1:42: warning: multi-character character constant [-Wmultichar]
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                                          ^~~~~
a.cc:1:1: error: 'l' does not name a type
    1 | l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
      | ^
Language: C++

#include<cstdio>
#include<vector>
#include<string>
 
using namespace std;
string<vector> week[]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
 
int main(){
  string st;
  int i;
  cin >> st;
  for(i=0;week[i]!=st;i++);
   
  cout << week[(i+2)%7];
    
}

Compiler output:
a.cc:6:1: error: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not a template
    6 | string<vector> week[]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> st;
      |   ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<string>
  +++ |+#include <iostream>
    4 | 
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << week[(i+2)%7];
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std; 
 
int main()
{
  String S;
  int day;
  cin >> S;
  
  switch(S)
  {
    case "SUN":
      day = 7;
      break;
    case "MON":
      day = 6;
      break;
    case "TUE":
      day = 5;
      break;
    case "WED":
      day = 4;
      break;
    case "THU":
      day = 3;
      break;
    case "FRI":
      day = 2;
      break;
    case "SAT":
      day = 1;
      break;
  }
  
  cout << day << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'String' was not declared in this scope
    6 |   String S;
      |   ^~~~~~
a.cc:8:10: error: 'S' was not declared in this scope
    8 |   cin >> S;
      |          ^
Language: C++

#include <iostream>
using namespace std; 
 
int main()
{
  String S;
  int day;
  cin >> S;
  
  switch(wk)
  {
    case "SUN":
      day = 7;
      break;
    case "MON":
      day = 6;
      break;
    case "TUE":
      day = 5;
      break;
    case "WED":
      day = 4;
      break;
    case "THU":
      day = 3;
      break;
    case "FRI":
      day = 2;
      break;
    case "SAT":
      day = 1;
      break;
  }
  
  cout << day << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'String' was not declared in this scope
    6 |   String S;
      |   ^~~~~~
a.cc:8:10: error: 'S' was not declared in this scope
    8 |   cin >> S;
      |          ^
a.cc:10:10: error: 'wk' was not declared in this scope
   10 |   switch(wk)
      |          ^~
Language: C++

#include<cstdio>
#include<vector>
#include<string>

using namespace std;
string<vector> week[]={"SUN","MON","TUE","WED","THU","FRI","SAT"}

int main(){
  string st;
  int i;
  cin >> st;
  for(i=0;week[i]!=st;i++);
   
  cout << week[(i+2)%7];
    
}

Compiler output:
a.cc:6:1: error: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not a template
    6 | string<vector> week[]={"SUN","MON","TUE","WED","THU","FRI","SAT"}
      | ^~~~~~
a.cc:8:1: error: expected ',' or ';' before 'int'
    8 | int main(){
      | ^~~
Language: C++

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


int main(){
	int a;
	string s;
	cin >> s;
	if(s==SUN) a=7;
	if(s==MON) a=6;
	if(s==TUE) a=5;
	if(s==WED) a=4;
	if(s==THU) a=3;
	if(s==FRI) a=2;
	if(s==SAT) a=1;
	
	cout << a << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'SUN' was not declared in this scope
    9 |         if(s==SUN) a=7;
      |               ^~~
a.cc:10:15: error: 'MON' was not declared in this scope
   10 |         if(s==MON) a=6;
      |               ^~~
a.cc:11:15: error: 'TUE' was not declared in this scope
   11 |         if(s==TUE) a=5;
      |               ^~~
a.cc:12:15: error: 'WED' was not declared in this scope
   12 |         if(s==WED) a=4;
      |               ^~~
a.cc:13:15: error: 'THU' was not declared in this scope
   13 |         if(s==THU) a=3;
      |               ^~~
a.cc:14:15: error: 'FRI' was not declared in this scope
   14 |         if(s==FRI) a=2;
      |               ^~~
a.cc:15:15: error: 'SAT' was not declared in this scope
   15 |         if(s==SAT) a=1;
      |               ^~~
Language: C++

#include <stdio.h>

int main(null){
  
  char uno,dos,tres;

  scanf("%c%c%c",&uno,&dos,&tres);

  if(uno=='S' && dos=='U' && tres=='N')
    printf("7");
  
  if(uno=='M' && dos=='O' && tres=='N')
    printf("6");

  if(uno=='T' && dos=='U' && tres=='E')
    printf("5");

  if(uno=='W' && dos=='E' && tres=='D')
    printf("4");

  if(uno=='T' && dos=='H' && tres=='U')
    printf("3");

  if(uno=='F' && dos=='R' && tres=='I')
    printf("2");

  if(uno=='S' && dos=='A' && tres=='T')
    printf("1");

}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main(null){
      |     ^~~~
a.cc:3:10: error: 'null' was not declared in this scope
    3 | int main(null){
      |          ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  if(s==SUN){
    cout<<"7";
  }
  if(s==MON){
    cout<<"6";
  }
  if(s==TUE){
    cout<<"5";
  }
  if(s==WED){
    cout<<"4";
  }
  if(s==THU){
    cout<<"3";
  }
  if(s==FRI){
    cout<<"2";
  }
  if(s==SAT){
    cout<<"1";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'SUN' was not declared in this scope
    6 |   if(s==SUN){
      |         ^~~
a.cc:9:9: error: 'MON' was not declared in this scope
    9 |   if(s==MON){
      |         ^~~
a.cc:12:9: error: 'TUE' was not declared in this scope
   12 |   if(s==TUE){
      |         ^~~
a.cc:15:9: error: 'WED' was not declared in this scope
   15 |   if(s==WED){
      |         ^~~
a.cc:18:9: error: 'THU' was not declared in this scope
   18 |   if(s==THU){
      |         ^~~
a.cc:21:9: error: 'FRI' was not declared in this scope
   21 |   if(s==FRI){
      |         ^~~
a.cc:24:9: error: 'SAT' was not declared in this scope
   24 |   if(s==SAT){
      |         ^~~
Language: C++

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

int main(){
    std::string S = "SUN","MON","TUE","WED","THU","FRI","SAT";

    cin >> S;

    if(SUN){
        cout << "7" << endl;
    }else if(MON){
        cout << "6" << endl;
    }else if(TUE){
        cout << "5" << endl;
    }else if(WED){
        cout << "4" << endl;
    }else if(THU){
        cout << "3" << endl;
    }else if(FRI){
        cout << "2" << endl;
    }else {
        cout << "1" << endl; 
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: expected unqualified-id before string constant
    6 |     std::string S = "SUN","MON","TUE","WED","THU","FRI","SAT";
      |                           ^~~~~
a.cc:10:8: error: 'SUN' was not declared in this scope
   10 |     if(SUN){
      |        ^~~
a.cc:12:14: error: 'MON' was not declared in this scope
   12 |     }else if(MON){
      |              ^~~
a.cc:14:14: error: 'TUE' was not declared in this scope
   14 |     }else if(TUE){
      |              ^~~
a.cc:16:14: error: 'WED' was not declared in this scope
   16 |     }else if(WED){
      |              ^~~
a.cc:18:14: error: 'THU' was not declared in this scope
   18 |     }else if(THU){
      |              ^~~
a.cc:20:14: error: 'FRI' was not declared in this scope
   20 |     }else if(FRI){
      |              ^~~
Language: C++

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

int main(){
    std::string S = SUN,MON,TUE,WED,THU,FRI,SAT;

    cin >> S;

    if(SUN){
        cout << "7" << endl;
    }else if(MON){
        cout << "6" << endl;
    }else if(TUE){
        cout << "5" << endl;
    }else if(WED){
        cout << "4" << endl;
    }else if(THU){
        cout << "3" << endl;
    }else if(FRI){
        cout << "2" << endl;
    }else {
        cout << "1" << endl; 
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'SUN' was not declared in this scope
    6 |     std::string S = SUN,MON,TUE,WED,THU,FRI,SAT;
      |                     ^~~
a.cc:12:14: error: 'MON' was not declared in this scope
   12 |     }else if(MON){
      |              ^~~
a.cc:14:14: error: 'TUE' was not declared in this scope
   14 |     }else if(TUE){
      |              ^~~
a.cc:16:14: error: 'WED' was not declared in this scope
   16 |     }else if(WED){
      |              ^~~
a.cc:18:14: error: 'THU' was not declared in this scope
   18 |     }else if(THU){
      |              ^~~
a.cc:20:14: error: 'FRI' was not declared in this scope
   20 |     }else if(FRI){
      |              ^~~
Language: C++

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

int main(){
    std::char SUN,MON,TUE,WED,THU,FRI,SAT;
    char S;

    cin >> S;

    if(SUN){
        cout << "7" << endl;
    }else if(MON){
        cout << "6" << endl;
    }else if(TUE){
        cout << "5" << endl;
    }else if(WED){
        cout << "4" << endl;
    }else if(THU){
        cout << "3" << endl;
    }else if(FRI){
        cout << "2" << endl;
    }else {
        cout << "1" << endl; 
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before 'char'
    6 |     std::char SUN,MON,TUE,WED,THU,FRI,SAT;
      |          ^~~~
a.cc:11:8: error: 'SUN' was not declared in this scope
   11 |     if(SUN){
      |        ^~~
a.cc:13:14: error: 'MON' was not declared in this scope
   13 |     }else if(MON){
      |              ^~~
a.cc:15:14: error: 'TUE' was not declared in this scope
   15 |     }else if(TUE){
      |              ^~~
a.cc:17:14: error: 'WED' was not declared in this scope
   17 |     }else if(WED){
      |              ^~~
a.cc:19:14: error: 'THU' was not declared in this scope
   19 |     }else if(THU){
      |              ^~~
a.cc:21:14: error: 'FRI' was not declared in this scope
   21 |     }else if(FRI){
      |              ^~~
Language: C

#include <stdio.h>
int main(){
  char s[100];
  scanf("%s",&s);
  if(s==SUN) printf("%d",7);
  else if(s==MON) printf("%d",6);
  else if(s==TUE) printf("%d",5);
  else if(s==WED) printf("%d",4);
  else if(s==THU) printf("%d",3);
  else if(s==FRI) printf("%d",2);
  else if(s==SAT) printf("%d",1);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'SUN' undeclared (first use in this function)
    5 |   if(s==SUN) printf("%d",7);
      |         ^~~
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:14: error: 'MON' undeclared (first use in this function)
    6 |   else if(s==MON) printf("%d",6);
      |              ^~~
main.c:7:14: error: 'TUE' undeclared (first use in this function)
    7 |   else if(s==TUE) printf("%d",5);
      |              ^~~
main.c:8:14: error: 'WED' undeclared (first use in this function)
    8 |   else if(s==WED) printf("%d",4);
      |              ^~~
main.c:9:14: error: 'THU' undeclared (first use in this function)
    9 |   else if(s==THU) printf("%d",3);
      |              ^~~
main.c:10:14: error: 'FRI' undeclared (first use in this function)
   10 |   else if(s==FRI) printf("%d",2);
      |              ^~~
main.c:11:14: error: 'SAT' undeclared (first use in this function)
   11 |   else if(s==SAT) printf("%d",1);
      |              ^~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  char S[10];
  int day;
  
  cin >> S;
  
  switch(S)
  {
    case "SUN":
      day = 7;
      break;
    case "MON":
      day = 6;
      break;
    case "TUE":
      day = 5;
      break;
    case "WED":
      day = 4;
      break;
    case "THU":
      day = 3;
      break;
    case "FRI":
      day = 2;
      break;
    case "SAT":
      day = 1;
      break;
  }
  
  cout << day << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: switch quantity not an integer
   11 |   switch(S)
      |          ^
Language: C++

#include <stdio.h>

int main(void) {
	char day[4];
	scanf("%s", day);

	if (day == 'SUN')
	{
		printf("%d", 7);
	}
	if (day == 'MON')
	{
		printf("%d", 6);
	}
	if (day == 'TUE')
	{
		printf("%d", 5);
	}
	if (day == 'WED')
	{
		printf("%d", 4);
	}
	if (day == 'THU')
	{
		printf("%d", 3);
	}
	if (day == 'FRI')
	{
		printf("%d", 2);
	}
	if (day == 'SAT')
	{
		printf("%d", 1);
	}
}}

Compiler output:
a.cc:7:20: warning: multi-character character constant [-Wmultichar]
    7 |         if (day == 'SUN')
      |                    ^~~~~
a.cc:11:20: warning: multi-character character constant [-Wmultichar]
   11 |         if (day == 'MON')
      |                    ^~~~~
a.cc:15:20: warning: multi-character character constant [-Wmultichar]
   15 |         if (day == 'TUE')
      |                    ^~~~~
a.cc:19:20: warning: multi-character character constant [-Wmultichar]
   19 |         if (day == 'WED')
      |                    ^~~~~
a.cc:23:20: warning: multi-character character constant [-Wmultichar]
   23 |         if (day == 'THU')
      |                    ^~~~~
a.cc:27:20: warning: multi-character character constant [-Wmultichar]
   27 |         if (day == 'FRI')
      |                    ^~~~~
a.cc:31:20: warning: multi-character character constant [-Wmultichar]
   31 |         if (day == 'SAT')
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:7:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if (day == 'SUN')
      |             ~~~~^~~~~~~~
a.cc:11:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if (day == 'MON')
      |             ~~~~^~~~~~~~
a.cc:15:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         if (day == 'TUE')
      |             ~~~~^~~~~~~~
a.cc:19:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if (day == 'WED')
      |             ~~~~^~~~~~~~
a.cc:23:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if (day == 'THU')
      |             ~~~~^~~~~~~~
a.cc:27:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         if (day == 'FRI')
      |             ~~~~^~~~~~~~
a.cc:31:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |         if (day == 'SAT')
      |             ~~~~^~~~~~~~
a.cc: At global scope:
a.cc:35:2: error: expected declaration before '}' token
   35 | }}
      |  ^
Language: C++

#include <stdio.h>

int main(void) {
	char day[4];
	scanf("%s", day);

	if (day == 'SUN')
	{
		printf("%d", 7);
	}
	if (day == 'MON')
	{
		printf("%d", 6);
	}
	if (day == 'TUE')
	{
		printf("%d", 5);
	}
	if (day == 'WED')
	{
		printf("%d", 4);
	}
	if (day == 'THU')
	{
		printf("%d", 3);
	}
	if (day == 'FRI')
	{
		printf("%d", 2);
	}
	if (day == 'SAT')
	{
		printf("%d", 1);
	}
}
		return 0:
}

Compiler output:
a.cc:7:20: warning: multi-character character constant [-Wmultichar]
    7 |         if (day == 'SUN')
      |                    ^~~~~
a.cc:11:20: warning: multi-character character constant [-Wmultichar]
   11 |         if (day == 'MON')
      |                    ^~~~~
a.cc:15:20: warning: multi-character character constant [-Wmultichar]
   15 |         if (day == 'TUE')
      |                    ^~~~~
a.cc:19:20: warning: multi-character character constant [-Wmultichar]
   19 |         if (day == 'WED')
      |                    ^~~~~
a.cc:23:20: warning: multi-character character constant [-Wmultichar]
   23 |         if (day == 'THU')
      |                    ^~~~~
a.cc:27:20: warning: multi-character character constant [-Wmultichar]
   27 |         if (day == 'FRI')
      |                    ^~~~~
a.cc:31:20: warning: multi-character character constant [-Wmultichar]
   31 |         if (day == 'SAT')
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:7:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if (day == 'SUN')
      |             ~~~~^~~~~~~~
a.cc:11:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if (day == 'MON')
      |             ~~~~^~~~~~~~
a.cc:15:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         if (day == 'TUE')
      |             ~~~~^~~~~~~~
a.cc:19:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if (day == 'WED')
      |             ~~~~^~~~~~~~
a.cc:23:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if (day == 'THU')
      |             ~~~~^~~~~~~~
a.cc:27:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         if (day == 'FRI')
      |             ~~~~^~~~~~~~
a.cc:31:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |         if (day == 'SAT')
      |             ~~~~^~~~~~~~
a.cc: At global scope:
a.cc:36:17: error: expected unqualified-id before 'return'
   36 |                 return 0:
      |                 ^~~~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

char* S;
int day;

int main()
{
	cin >> S;
  	switch(S)
    {
      case "SUN": 
        int = 7;
        break;
      case "MON":
        int = 6;
        break;
      case "TUE":
        int = 5;
        break;
      case "WED":
        int = 4;
        break;
      case "THU":
        int = 3;
        break;
      case "FRI":
        int = 2;
        break;
      case "SAT":
        int = 1;
        break;
    }
  cout << day << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: switch quantity not an integer
   10 |         switch(S)
      |                ^
a.cc:13:13: error: expected unqualified-id before '=' token
   13 |         int = 7;
      |             ^
a.cc:16:13: error: expected unqualified-id before '=' token
   16 |         int = 6;
      |             ^
a.cc:19:13: error: expected unqualified-id before '=' token
   19 |         int = 5;
      |             ^
a.cc:22:13: error: expected unqualified-id before '=' token
   22 |         int = 4;
      |             ^
a.cc:25:13: error: expected unqualified-id before '=' token
   25 |         int = 3;
      |             ^
a.cc:28:13: error: expected unqualified-id before '=' token
   28 |         int = 2;
      |             ^
a.cc:31:13: error: expected unqualified-id before '=' token
   31 |         int = 1;
      |             ^