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_18174729_5912.cpp: In member function 'void BinarySortTree<T>::InsertRecursion(Node<T>*&, T)':
0_0_18174729_5912.cpp:61:40: error: there are no arguments to 'malloc' that depend on a template parameter, so a declaration of 'malloc' must be available [-fpermissive]
    node = (Node<T>*)malloc(sizeof(node));
                                        ^
0_0_18174729_5912.cpp:61:40: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
0_0_18174729_5912.cpp: In member function 'void BinarySortTree<T>::DeleteRecursion(Node<T>*&, T, Node<T>*&, bool)':
0_0_18174729_5912.cpp:107:9: error: missing template arguments before '*' token
     Node* tempNode = node->leftNode;
         ^
0_0_18174729_5912.cpp:107:11: error: 'tempNode' was not declared in this scope
     Node* tempNode = node->leftNode;
           ^
0_0_18174729_5912.cpp:108:9: error: missing template arguments before '*' token
     Node* tempParentNode = node;
         ^
0_0_18174729_5912.cpp:108:11: error: 'tempParentNode' was not declared in this scope
     Node* tempParentNode = node;
           ^
0_0_18174729_5912.cpp: In instantiation of 'void BinarySortTree<T>::InsertRecursion(Node<T>*&, T) [with T = char]':
0_0_18174729_5912.cpp:32:33:   required from 'void BinarySortTree<T>::Insert(T) [with T = char]'
0_0_18174729_5912.cpp:24:21:   required from 'BinarySortTree<T>::BinarySortTree(const std::vector<T>&) [with T = char]'
0_0_18174729_5912.cpp:192:69:   required from here
0_0_18174729_5912.cpp:61:40: error: 'malloc' was not declared in this scope
    node = (Node<T>*)malloc(sizeof(node));
                                        ^


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-06-27 04:27:04, Gzip enabled