F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_18783179_4001.cpp: In function 'void siftPrime(int, primeTable*)':
0_0_18783179_4001.cpp:13:47: error: 'malloc' was not declared in this scope
  flag = (char *)malloc(sizeof(char) * (n >> 1));
                                               ^
0_0_18783179_4001.cpp:14:43: error: 'memset' was not declared in this scope
  memset(flag, '0', sizeof(char) * (n >> 1));
                                           ^
0_0_18783179_4001.cpp:16:19: error: 'sqrt' was not declared in this scope
  sqrtRoot = sqrt(n);
                   ^
0_0_18783179_4001.cpp:27:11: error: 'free' was not declared in this scope
  free(flag);
           ^
0_0_18783179_4001.cpp: In function 'long long int maxPower(long long int, long long int, primeTable*)':
0_0_18783179_4001.cpp:76:53: error: 'malloc' was not declared in this scope
  pf = (primeFactor *)malloc(sizeof(primeFactor) * 50);
                                                     ^
0_0_18783179_4001.cpp:85:9: error: 'free' was not declared in this scope
  free(pf);
         ^
0_0_18783179_4001.cpp: In function 'int main()':
0_0_18783179_4001.cpp:94:79: error: 'malloc' was not declared in this scope
  pt.primeSet = (int *)malloc(sizeof(int) * (((MAXN / 100) >> 1) + (MAXN >> 3)));
                                                                               ^
0_0_18783179_4001.cpp:107:18: error: 'free' was not declared in this scope
  free(pt.primeSet);
                  ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-09-20 11:53:18, Gzip enabled