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_39829705_14155.cpp: In constructor 'TrieNode::TrieNode()':
0_0_39829705_14155.cpp:18:28: error: 'memset' was not declared in this scope
   18 |         TrieNode():cnt(1) {memset(next, 0, sizeof(next)),str[0] = 0;}
      |                            ^~~~~~
0_0_39829705_14155.cpp:6:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    5 | #include <string>
  +++ |+#include <cstring>
    6 | //#define LOCAL
0_0_39829705_14155.cpp: In function 'int insert(int)':
0_0_39829705_14155.cpp:40:84: error: 'strlen' was not declared in this scope
   40 |                                         memcpy(newNode->str, (GETCHILD(i)->str)+x, strlen((GETCHILD(i)->str+x))+1); // +1 是为了拷贝一个 0过来
      |                                                                                    ^~~~~~
0_0_39829705_14155.cpp:40:84: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
0_0_39829705_14155.cpp:43:41: error: 'memset' was not declared in this scope
   43 |                                         memset(GETCHILD(i)->next, 0, sizeof(GETCHILD(i)->next)); // GETCHILD的孩子清空(因为已经由newNode接管了)
      |                                         ^~~~~~
0_0_39829705_14155.cpp:43:41: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
0_0_39829705_14155.cpp:60:64: error: 'strlen' was not declared in this scope
   60 |                                 memcpy(GETCHILD(i)->str,key+i, strlen(key+i)+1); // 将key剩下的全部字符全部拷贝进此节点的str中(这就是压缩trie), +1的原因是把\0也拷贝过去
      |                                                                ^~~~~~
0_0_39829705_14155.cpp:60:64: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?


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-11-25 17:57:49, Gzip enabled