I am unable to figure out what the problem is in the code below
class Node
{
private:
int index, value;
public:
Node(int index=0, int value=0):index(index),value(value){}
int getIndex()
{
return index;
}
int getValue()
{
return value;
}
};
int main()
{
Node n = new Node(10,10);
return 0;
}
I get
invalid conversion from Node* to int