如何修复“无效的操作数为二进制+(具有'char *'和'char *')”?

时间:2019-12-24 06:41:19

标签: c

我正在编写一个简单的子手游戏。这是我的代码:

Resources:
  bucket1:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Ref SourceBucket
      NotificationConfiguration:
        LambdaConfigurations:
            - Event: 's3:ObjectCreated:*'
              Function: !GetAtt LambdaFunction.Arn
  BucketPermission:
    Type: AWS::Lambda::Permission
    Properties:
      Action: 'lambda:InvokeFunction'
      FunctionName: !Ref LambdaFunction
      Principal: s3.amazonaws.com
      SourceArn: !Sub arn:aws:s3:::${SourceBucket}

但是它给了我这个错误:

#include <stdio.h>
#include <stdbool.h>

int main() {
    printf("Welcome to the Hangman game.");
    char word[] = "B";
    int size = sizeof(word)/sizeof(word[0])-1;
    bool win = false;
    char printer[] = "";
    char acc[] = "";
    int i;
    for (i = 0; i < size; i++) {
        printer = printer + "_ ";
        acc = acc + "_";
    }
    return(0);
}

我该如何解决?

0 个答案:

没有答案