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_28442837_4594.cpp: In function 'int main()':
0_0_28442837_4594.cpp:39:44: error: no matching function for call to 'Node::Node(std::string, int&, int&)'
    arr.push_back(Node(toStr(name), i, grade));
                                            ^
0_0_28442837_4594.cpp:39:44: note: candidates are:
0_0_28442837_4594.cpp:10:2: note: Node::Node(std::string&, int, int)
  Node(string& str, int i, int g) :name(str), id(i), grade(g) { }
  ^
0_0_28442837_4594.cpp:10:2: note:   no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'std::string& {aka std::basic_string<char>&}'
0_0_28442837_4594.cpp:9:2: note: Node::Node()
  Node() { }
  ^
0_0_28442837_4594.cpp:9:2: note:   candidate expects 0 arguments, 3 provided
0_0_28442837_4594.cpp:7:7: note: Node::Node(const Node&)
 class Node {
       ^
0_0_28442837_4594.cpp:7:7: note:   candidate expects 1 argument, 3 provided
0_0_28442837_4594.cpp:7:7: note: Node::Node(Node&&)
0_0_28442837_4594.cpp:7:7: note:   candidate expects 1 argument, 3 provided


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-28 19:14:13, Gzip enabled