Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:12:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 1;i <= s.length() - 1;i++){
                ~~^~~~~~~~~~~~~~~~~
/in/foo.cc:14:28: error: lvalue required as left operand of assignment
   if(s[i] == '3' && a[1] = 1) a[2] = 1;
                            ^
/in/foo.cc:15:28: error: lvalue required as left operand of assignment
   if(s[i] == '5' && a[2] = 1) a[3] = 1;
                            ^
/in/foo.cc:16:28: error: lvalue required as left operand of assignment
   if(s[i] == '5' && a[3] = 1) a[4] = 1;
                            ^
/in/foo.cc:17:28: error: lvalue required as left operand of assignment
   if(s[i] == '6' && a[4] = 1) a[5] = 1;
                            ^
/in/foo.cc:18:28: error: lvalue required as left operand of assignment
   if(s[i] == '8' && a[5] = 1) a[6] = 1;
                            ^
/in/foo.cc:19:28: error: lvalue required as left operand of assignment
   if(s[i] == '9' && a[6] = 1){
                            ^

信息

递交者
类型
递交
题目
P1030 C4-A
语言
C++
递交时间
2024-04-22 20:43:25
评测时间
2024-04-22 20:43:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes