/ Vijos /

记录详情

Compile Error

/in/foo.c:2:1: error: unknown type name 'using'
 using namespace std;
 ^~~~~
/in/foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
 using namespace std;
                 ^~~
/in/foo.c:3:1: error: unknown type name 'string'
 string c,s;
 ^~~~~~
/in/foo.c:7:6: error: variably modified 'q' at file scope
  int q[S];
      ^
/in/foo.c:23:18: error: expected ')' before '&' token
 void init(string &s,Int &a){
                  ^
/in/foo.c:29:14: error: expected ')' before '&' token
 void add(Int &a,Int &b){
              ^
/in/foo.c: In function 'main':
/in/foo.c:41:2: error: 'cin' undeclared (first use in this function)
  cin>>c>>s;
  ^~~
/in/foo.c:41:2: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:42:2: error: unknown type name 'Int'
  Int a,b,ans;
  ^~~
/in/foo.c:42:2: note: use 'struct' keyword to refer to the type
/in/foo.c:43:2: warning: implicit declaration of function 'init' [-Wimplicit-function-declaration]
  init(c,a);init(s,b);
  ^~~~
/in/foo.c:11:28: error: request for member 'len' in something not a structure or union
 #define mul(a,b,c) int la=a.len,lb=b.len;\
                            ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:11:37: error: request for member 'len' in something not a structure or union
 #define mul(a,b,c) int la=a.len,lb=b.len;\
                                     ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:14:5: error: request for member 'q' in something not a structure or union
    c.q[i+j]+=a.q[i]*b.q[j];\
     ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:14:15: error: request for member 'q' in something not a structure or union
    c.q[i+j]+=a.q[i]*b.q[j];\
               ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:14:22: error: request for member 'q' in something not a structure or union
    c.q[i+j]+=a.q[i]*b.q[j];\
                      ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:15:14: error: request for member 'q' in something not a structure or union
             c.q[i+j+1]+=c.q[i+j]/10;\
              ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:15:26: error: request for member 'q' in something not a structure or union
             c.q[i+j+1]+=c.q[i+j]/10;\
                          ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:16:14: error: request for member 'q' in something not a structure or union
             c.q[i+j]%=10;\
              ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:19:6: error: request for member 'q' in something not a structure or union
  if(c.q[la+lb-1]!=0)c.len=la+lb;\
      ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:19:22: error: request for member 'len' in something not a structure or union
  if(c.q[la+lb-1]!=0)c.len=la+lb;\
                      ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:20:8: error: request for member 'len' in something not a structure or union
  else c.len=la+lb-1;\
        ^
/in/foo.c:44:5: note: in expansion of macro 'mul'
     mul(a,b,ans);
     ^~~
/in/foo.c:10:31: error: request for member 'len' in something not a structure or union
 #define out(a) for(int (i)=(a).len-1;(i)>=0;(i)--)cout<<(a).q[(i)];
                               ^
/in/foo.c:45:5: note: in expansion of macro 'out'
     out(ans);
     ^~~
/in/foo.c:10:51: error: 'cout' undeclared (first use in this function)
 #define out(a) for(int (i)=(a).len-1;(i)>=0;(i)--)cout<<(a).q[(i)];
                                                   ^
/in/foo.c:45:5: note: in expansion of macro 'out'
     out(ans);
     ^~~
/in/foo.c:10:60: error: request for member 'q' in something not a structure or union
 #define out(a) for(int (i)=(a).len-1;(i)>=0;(i)--)cout<<(a).q[(i)];
                                                            ^
/in/foo.c:45:5: note: in expansion of macro 'out'
     out(ans);
     ^~~
/in/foo.c:42:10: warning: variable 'ans' set but not used [-Wunused-but-set-variable]
  Int a,b,ans;
          ^~~

信息

递交者
类型
递交
题目
P1040 高精度乘法
语言
C
递交时间
2021-05-26 23:21:15
评测时间
2021-05-26 23:21:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes