0_0_28157567_14276.cpp:1:1: error: 'import' does not name a type
import java.util.LinkedList;
^
0_0_28157567_14276.cpp:2:1: error: 'import' does not name a type
import java.util.Queue;
^
0_0_28157567_14276.cpp:3:1: error: 'import' does not name a type
import java.util.Scanner;
^
0_0_28157567_14276.cpp:7:12: error: 'final' does not name a type
static final int NODE_SIZE = 30;
^
0_0_28157567_14276.cpp:10:16: error: expected ':' before 'int'
public int cnt;
^
0_0_28157567_14276.cpp:11:16: error: expected ':' before 'Node'
public Node ch[];
^
0_0_28157567_14276.cpp:11:24: error: field 'ch' has incomplete type 'ACautomation::Node [0]'
public Node ch[];
^
0_0_28157567_14276.cpp:12:16: error: expected ':' before 'Node'
public Node fail;
^
0_0_28157567_14276.cpp:12:21: error: field 'fail' has incomplete type 'ACautomation::Node'
public Node fail;
^
0_0_28157567_14276.cpp:18:5: error: expected ';' after class definition
}
^
0_0_28157567_14276.cpp:20:12: error: expected ':' before 'Node'
public Node root;
^
0_0_28157567_14276.cpp:22:12: error: expected ':' before 'ACautomation'
public ACautomation() {
^
0_0_28157567_14276.cpp:26:12: error: expected ':' before 'int'
public int getCharId(char ch) {
^
0_0_28157567_14276.cpp:30:12: error: expected ':' before 'void'
public void insert(String str) {
^
0_0_28157567_14276.cpp:30:24: error: 'String' has not been declared
public void insert(String str) {
^
0_0_28157567_14276.cpp:42:12: error: expected ':' before 'boolean'
public boolean find(String str) {
^
0_0_28157567_14276.cpp:42:12: error: 'boolean' does not name a type
0_0_28157567_14276.cpp:79:15: error: 'String' has not been declared
int query(String str) {
^
0_0_28157567_14276.cpp:95:1: error: expected ';' after class definition
}
^
0_0_28157567_14276.cpp: In constructor 'ACautomation::Node::Node()':
0_0_28157567_14276.cpp:14:27: error: 'NODE_SIZE' was not declared in this scope
ch = new Node[NODE_SIZE];
^
0_0_28157567_14276.cpp:16:20: error: 'null' was not declared in this scope
fail = null;
^
0_0_28157567_14276.cpp: In constructor 'ACautomation::ACautomation()':
0_0_28157567_14276.cpp:23:14: error: no match for 'operator=' (operand types are 'ACautomation::Node' and 'ACautomation::Node*')
root = new Node();
^
0_0_28157567_14276.cpp:23:14: note: candidates are:
0_0_28157567_14276.cpp:9:11: note: ACautomation::Node& ACautomation::Node::operator=(const ACautomation::Node&)
class Node {
^
0_0_28157567_14276.cpp:9:11: note: no known conversion for argument 1 from 'ACautomation::Node*' to 'const ACautomation::Node&'
0_0_28157567_14276.cpp:9:11: note: ACautomation::Node& ACautomation::Node::operator=(ACautomation::Node&&)
0_0_28157567_14276.cpp:9:11: note: no known conversion for argument 1 from 'ACautomation::Node*' to 'ACautomation::Node&&'
0_0_28157567_14276.cpp: In member function 'void ACautomation::insert(int)':
0_0_28157567_14276.cpp:32:32: error: request for member 'length' in 'str', which is of non-class type 'int'
for(int i = 0; i < str.length(); i++ ) {
^
0_0_28157567_14276.cpp:33:36: error: request for member 'charAt' in 'str', which is of non-class type 'int'
int id = getCharId(str.charAt(i));
^
0_0_28157567_14276.cpp:34:30: error: 'null' was not declared in this scope
if(now.ch[id] == null) {
^
0_0_28157567_14276.cpp: In member function 'void ACautomation::buildFail()':
0_0_28157567_14276.cpp:55:9: error: 'Queue' was not declared in this scope
Queue<Node>queue = new LinkedList<>();
^
0_0_28157567_14276.cpp:55:19: error: expected primary-expression before '>' token
Queue<Node>queue = new LinkedList<>();
^
0_0_28157567_14276.cpp:55:20: error: 'queue' was not declared in this scope
Queue<Node>queue = new LinkedList<>();
^
0_0_28157567_14276.cpp:55:32: error: 'LinkedList' does not name a type
Queue<Node>queue = new LinkedList<>();
^
0_0_28157567_14276.cpp:55:43: error: expected primary-expression before '>' token
Queue<Node>queue = new LinkedList<>();
^
0_0_28157567_14276.cpp:55:45: error: expected primary-expression before ')' token
Queue<Node>queue = new LinkedList<>();
^
0_0_28157567_14276.cpp:57:28: error: 'NODE_SIZE' was not declared in this scope
for(int i = 0; i < NODE_SIZE; i++ ) {
^
0_0_28157567_14276.cpp:58:30: error: 'null' was not declared in this scope
if(root.ch[i] == null) {
^
0_0_28157567_14276.cpp:67:15: error: 'LinkedList' was not declared in this scope
((LinkedList<Node>) queue).pop();
^
0_0_28157567_14276.cpp:67:30: error: expected primary-expression before '>' token
((LinkedList<Node>) queue).pop();
^
0_0_28157567_14276.cpp:67:31: error: expected primary-expression before ')' token
((LinkedList<Node>) queue).pop();
^
0_0_28157567_14276.cpp:67:33: error: expected ')' before 'queue'
((LinkedList<Node>) queue).pop();
^
0_0_28157567_14276.cpp:68:32: error: 'NODE_SIZE' was not declared in this scope
for(int i = 0; i < NODE_SIZE; i++ ) {
^
0_0_28157567_14276.cpp:69:33: error: 'null' was not declared in this scope
if(now.ch[i] == null) {
^
0_0_28157567_14276.cpp:73:38: error: expected primary-expression before '>' token
((LinkedList<Node>) queue).add(now.ch[i]);
^
0_0_28157567_14276.cpp:73:39: error: expected primary-expression before ')' token
((LinkedList<Node>) queue).add(now.ch[i]);
^
0_0_28157567_14276.cpp:73:41: error: expected ')' before 'queue'
((LinkedList<Node>) queue).add(now.ch[i]);
^
0_0_28157567_14276.cpp: In member function 'int ACautomation::query(int)':
0_0_28157567_14276.cpp:82:32: error: request for member 'length' in 'str', which is of non-class type 'int'
for(int i = 0; i < str.length(); i++ ) {
^
0_0_28157567_14276.cpp:83:36: error: request for member 'charAt' in 'str', which is of non-class type 'int'
int id = getCharId(str.charAt(i));
^
0_0_28157567_14276.cpp:86:21: error: no match for 'operator!=' (operand types are 'ACautomation::Node' and 'ACautomation::Node')
while(p != root) {
^
0_0_28157567_14276.cpp: At global scope:
0_0_28157567_14276.cpp:97:1: error: expected unqualified-id before 'public'
public class Main {
^
|