Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
  string s;
  cin >> s;
  string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
  for (int i = 0; i<7; i++){
    if (s==days[i]){
      if (i==0){
      	a=7
      }else{
        a=i
      }
      cout << a << endl;
    }
  }


Compiler output:
a.cc:8:20: warning: multi-character character constant [-Wmultichar]
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                    ^~~~~
a.cc:8:26: warning: multi-character character constant [-Wmultichar]
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                          ^~~~~
a.cc:8:32: warning: multi-character character constant [-Wmultichar]
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                ^~~~~
a.cc:8:38: warning: multi-character character constant [-Wmultichar]
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                      ^~~~~
a.cc:8:44: warning: multi-character character constant [-Wmultichar]
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                            ^~~~~
a.cc:8:50: warning: multi-character character constant [-Wmultichar]
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                                  ^~~~~
a.cc:8:56: warning: multi-character character constant [-Wmultichar]
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                                        ^~~~~
a.cc: In function 'int main()':
a.cc:8:20: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                    ^~~~~
a.cc:8:26: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                          ^~~~~
a.cc:8:32: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                ^~~~~
a.cc:8:38: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                      ^~~~~
a.cc:8:44: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                            ^~~~~
a.cc:8:50: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                                  ^~~~~
a.cc:8:56: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string days[] = {'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                                        ^~~~~
a.cc:12:9: error: 'a' was not declared in this scope
   12 |         a=7
      |         ^
a.cc:14:9: error: 'a' was not declared in this scope
   14 |         a=i
      |         ^
a.cc:16:15: error: 'a' was not declared in this scope
   16 |       cout << a << endl;
      |               ^
a.cc:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^