Compile Error

foo.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |         ^
foo.cc:3:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      |      ^
foo.cc: In function 'int main()':
foo.cc:11:1: error: 'scanf' was not declared in this scope
   11 | scanf("%d",&n);
      | ^~~~~
foo.cc:15:10: error: expected ';' before '{' token
   15 | for(i=0;i
      |          ^
      |          ;
   16 | 
   17 | {
      | ~         
foo.cc:17:1: error: expected primary-expression before '{' token
   17 | {
      | ^
foo.cc:15:10: error: expected ')' before '{' token
   15 | for(i=0;i
      |    ~     ^
      |          )
   16 | 
   17 | {
      | ~         
foo.cc:19:10: error: expected ';' before 'printf'
   19 | for(j=0;j
      |          ^
      |          ;
   20 | 
   21 | printf(" ");
      | ~~~~~~    
foo.cc:21:1: error: 'printf' was not declared in this scope
   21 | printf(" ");
      | ^~~~~~
foo.cc:1:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
  +++ |+#include <cstdio>
    1 | #include
foo.cc:21:12: error: expected ')' before ';' token
   21 | printf(" ");
      |            ^
      |            )
foo.cc:19:4: note: to match this '('
   19 | for(j=0;j
      |    ^
foo.cc:25:1: error: 'printf' was not declared in this scope
   25 | printf(" *");
      | ^~~~~~
foo.cc:25:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc:27:1: error: 'printf' was not declared in this scope
   27 | printf("\n");
      | ^~~~~~
foo.cc:27:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc:33:10: error: expected ';' before '{' token
   33 | for(i=0;i
      |          ^
      |          ;
   34 | 
   35 | {
      | ~         
foo.cc:35:1: error: expected primary-expression before '{' token
   35 | {
      | ^
foo.cc:33:10: error: expected ')' before '{' token
   33 | for(i=0;i
      |    ~     ^
      |          )
   34 | 
   35 | {
      | ~         
foo.cc:39:1: error: 'printf' was not declared in this scope
   39 | printf(" ");
      | ^~~~~~
foo.cc:39:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc:41:10: error: expected ';' before 'printf'
   41 | for(k=0;k
      |          ^
      |          ;
   42 | 
   43 | printf(" *");
      | ~~~~~~    
foo.cc:43:1: error: 'printf' was not declared in this scope
   43 | printf(" *");
      | ^~~~~~
foo.cc:43:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc:43:13: error: expected ')' before ';' token
   43 | printf(" *");
      |             ^
      |             )
foo.cc:41:4: note: to match this '('
   41 | for(k=0;k
      |    ^
foo.cc:45:1: error: 'printf' was not declared in this scope
   45 | printf("\n");
      | ^~~~~~
foo.cc:45:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc: At global scope:
foo.cc:55:6: error: expected constructor, destructor, or type conversion before '(' token
   55 | scanf("%d",&n);
      |      ^
foo.cc:57:1: error: expected unqualified-id before 'for'
   57 | for (i=1;i<=n;i++)
      | ^~~
foo.cc:57:10: error: 'i' does not name a type
   57 | for (i=1;i<=n;i++)
      |          ^
foo.cc:57:15: error: 'i' does not name a type
   57 | for (i=1;i<=n;i++)
      |               ^
foo.cc:75:1: error: expected unqualified-id before 'for'
   75 | for (i=n;i>=1;i--)
      | ^~~
foo.cc:75:10: error: 'i' does not name a type
   75 | for (i=n;i>=1;i--)
      |          ^
foo.cc:75:15: error: 'i' does not name a type
   75 | for (i=n;i>=1;i--)
      |               ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1046 *组成的图形(6)
语言
C++
递交时间
2022-07-18 20:00:34
评测时间
2022-07-18 20:00:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes