[SOLVED] Cannot find symbol error?
Hi, I'm trying to create a priority queue based on the probabilities of chars as provided by a text file. However, on line 91 when I create a new node, it yields an error:
line 91: CharNode node = new CharNode();
cannot find symbol
symbol: constructor CharNode()
location: class CharNode
CharNode class:
class CharNode
{
// data members, all of which may need to be private
char c;
double prob;
CharNode left, right;
public CharNode(double p, CharNode l, CharNode r)
{
prob = p;
left = l;
right = r;
c = 0;
}
public CharNode(char c, double p)
{
this.c = c;
left = null;
right = null;
prob = p;
}
public CharNode getLeft()
{
return this.left;
}
public CharNode getRight()
{
return this.right;
}
public char getC()
{
return this.c;
}
public double getProb()
{
return this.prob;
}
}
Why is that (I'm sure it's some stupid mistake)? Thanks in advance!