How can I use a class before defining it?

Posted by TheMachineCharmer on Stack Overflow See other posts from Stack Overflow or by TheMachineCharmer
Published on 2010-05-25T13:04:32Z Indexed on 2010/05/26 2:21 UTC
Read the original article Hit count: 202

Filed under:
|
|
class Node
{
    string name;
    Node previous;
};

 Error: Node::previous uses "Node" which is being defined.

How can I get this to work in C++? It works in C#.

EDIT:

Why Node* previous works?

© Stack Overflow or respective owner

Related posts about c++

Related posts about class