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_35208345_13843.cpp: In member function 'Block* Block::find(char*, int)':
0_0_35208345_13843.cpp:6:18: error: 'son' was not declared in this scope
   for (Block *bl:son) if (strcmp(bl->name, name) == 0 && bl->type == type) return bl;return NULL;
                  ^
0_0_35208345_13843.cpp: In member function 'int Block::md(char*)':
0_0_35208345_13843.cpp:8:126: error: no matching function for call to 'Block::Block(Block*, char*&, int)'
   if (find(name, 0) != NULL) {cout << "directory already exist" << endl;return 1;} else {Block *tmp = new Block(this, name, 0);son.push_back(tmp);cout << "success" << endl;}
                                                                                                                              ^
0_0_35208345_13843.cpp:8:126: note: candidates are:
0_0_35208345_13843.cpp:4:184: note: Block::Block()
  int type;char name[256];Block *root;Block *father;vector<Block *> sonBlock(Block *fa, char name[], int type) {strcpy(this->name, name);root = fa->root;father = fa;this->type = type;}Block() {strcpy(name, "\\");type = 0;root = this;father = this;
                                                                                                                                                                                        ^
0_0_35208345_13843.cpp:4:184: note:   candidate expects 0 arguments, 3 provided
0_0_35208345_13843.cpp:3:8: note: constexpr Block::Block(const Block&)
 struct Block {
        ^
0_0_35208345_13843.cpp:3:8: note:   candidate expects 1 argument, 3 provided
0_0_35208345_13843.cpp:3:8: note: constexpr Block::Block(Block&&)
0_0_35208345_13843.cpp:3:8: note:   candidate expects 1 argument, 3 provided
0_0_35208345_13843.cpp:8:128: error: 'son' was not declared in this scope
   if (find(name, 0) != NULL) {cout << "directory already exist" << endl;return 1;} else {Block *tmp = new Block(this, name, 0);son.push_back(tmp);cout << "success" << endl;}
                                                                                                                                ^
0_0_35208345_13843.cpp: In member function 'int Block::rd(char*)':
0_0_35208345_13843.cpp:11:51: error: 'struct Block' has no member named 'son'
   if (p == NULL || p == father || p == root || p->son.size() > 0) {
                                                   ^
0_0_35208345_13843.cpp:15:40: error: 'son' was not declared in this scope
    for (vector<Block *>::iterator it = son.begin(); it != son.end(); it++) {if (*it == p) {son.erase(it);delete p;break;}}cout << "success" << endl;
                                        ^
0_0_35208345_13843.cpp: In member function 'int Block::ls()':
0_0_35208345_13843.cpp:18:18: error: 'son' was not declared in this scope
   for (Block *bl:son) cout << bl->type << " " << bl->name << endl;
                  ^
0_0_35208345_13843.cpp: In member function 'int Block::cre(char*)':
0_0_35208345_13843.cpp:24:40: error: no matching function for call to 'Block::Block(Block*, char*&, int)'
    Block *tmp = new Block(this, name, 1);son.push_back(tmp);cout << "success" << endl;return 0;
                                        ^
0_0_35208345_13843.cpp:24:40: note: candidates are:
0_0_35208345_13843.cpp:4:184: note: Block::Block()
  int type;char name[256];Block *root;Block *father;vector<Block *> sonBlock(Block *fa, char name[], int type) {strcpy(this->name, name);root = fa->root;father = fa;this->type = type;}Block() {strcpy(name, "\\");type = 0;root = this;father = this;
                                                                                                                                                                                        ^
0_0_35208345_13843.cpp:4:184: note:   candidate expects 0 arguments, 3 provided
0_0_35208345_13843.cpp:3:8: note: constexpr Block::Block(const Block&)
 struct Block {
        ^
0_0_35208345_13843.cpp:3:8: note:   candidate expects 1 argument, 3 provided
0_0_35208345_13843.cpp:3:8: note: constexpr Block::Block(Block&&)
0_0_35208345_13843.cpp:3:8: note:   candidate expects 1 argument, 3 provided
0_0_35208345_13843.cpp:24:42: error: 'son' was not declared in this scope
    Block *tmp = new Block(this, name, 1);son.push_back(tmp);cout << "success" << endl;return 0;
                                          ^
0_0_35208345_13843.cpp: In member function 'int Block::del(char*)':
0_0_35208345_13843.cpp:30:40: error: 'son' was not declared in this scope
    for (vector<Block *>::iterator it = son.begin(); it != son.end(); it++) {
                                        ^


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-01 10:29:37, Gzip enabled