/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void cheng(int*, int*, int (&)[301])':
foo.cpp:8:21: error: 'memset' was not declared in this scope
 memset(c,0,sizeof(c));
                     ^
foo.cpp:11:2: error: incompatible types in assignment of 'int' to 'array {aka int [301]}'
 c+=a[i]*b[j];
  ^
foo.cpp:14:2: error: incompatible types in assignment of 'int' to 'array {aka int [301]}'
 c+=c[i]/10;
  ^
foo.cpp: In function 'void chu(int*, int*, int (&)[301], int (&)[301])':
foo.cpp:33:21: error: 'memset' was not declared in this scope
 memset(c,0,sizeof(c));
                     ^
foo.cpp:44:2: error: incompatible types in assignment of 'int' to 'array {aka int [301]}'
 r-=b[k];
  ^
foo.cpp:47:2: error: decrement of read-only location '(int*)r'
 r--;
  ^
foo.cpp:47:2: error: lvalue required as decrement operand
foo.cpp:48:2: error: incompatible types in assignment of 'int' to 'array {aka int [301]}'
 r+=10;
  ^
foo.cpp:56:2: error: incompatible types in assignment of 'int' to 'array {aka int [301]}'
 r+=b[k];
  ^
foo.cpp:57:6: error: invalid operands of types 'array {aka int [301]}' and 'int' to binary 'operator/'
 r+=r/10;
      ^
foo.cpp:58:2: error: invalid operands of types 'array {aka int [301]}' and 'int' to binary 'operator%'
 r%=10;
  ^
foo.cpp:58:2: error:   in evaluation of 'operator%=(array {aka int [301]}, int)'
foo.cpp: In function 'void input(char*, int (&)[301])':
foo.cpp:65:21: error: 'memset' was not declared in this scope
 memset(a,0,sizeof(a));
                     ^
foo.cpp:66:15: error: 'strlen' was not declared in this scope
 int l=strlen(c),i;
               ^
foo.cpp:67:6: error: 'i' was not declared in this scope
 for (i=0;i<l;i++)
      ^
foo.cpp: In function 'void gcd()':
foo.cpp:87:21: error: 'memcpy' was not declared in this scope
 memcpy(A,B,sizeof(B));
                     ^

信息

递交者
类型
递交
题目
P1047 最小公倍数
语言
C++
递交时间
2015-02-22 21:49:48
评测时间
2015-02-22 21:49:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes