Код: Выделить всё
1> Node.h(4): error : invalid redeclaration of type name "Node" (declared at line 4)
1> class Node{
1> ^
Код: Выделить всё
using namespace std;
class Node{ //THIS IS LINE 4
public:
Node(int val);
int val;
Node* l_node;
Node* r_node;
private:
};
Код: Выделить всё
#include "Node.h"
Node::Node(int x) : l_node(nullptr), r_node(nullptr), val(x){
}
Подробнее здесь: https://stackoverflow.com/questions/198 ... oing-crazy