运行 ID: 35781

Main.cc: In function ‘int main()’:
Main.cc:8:11: error: expected ‘]’ before ‘+’ token
     char[n+1]='\0';
           ^
Main.cc:8:9: warning: decomposition declaration only available with -std=c++1z or -std=gnu++1z
     char[n+1]='\0';
         ^
Main.cc:8:9: error: decomposition declaration cannot be declared with type ‘char’
Main.cc:8:9: note: type must be cv-qualified ‘auto’ or reference to cv-qualified ‘auto’
Main.cc:8:13: error: conflicting declaration ‘auto n’
     char[n+1]='\0';
             ^
Main.cc:5:6: note: previous declaration as ‘int n’
  int n;
      ^