C++ TDM-GCC 4.8.1 64-bit
Error: main.cpp:(.text+0x15): undefined reference to `tree::tree()'
main.cpp
#include "tree.h"
#include <iostream>
using namespace std;
int main(){
tree tree1;
return 0;
}
tree.h
#ifndef TREE_H
#define TREE_H
using namespace std;
class tree{
public:
tree();
};
#endif
tree.cpp
#include "tree.h"
#include <iostream>
using namespace std;
tree::tree(){
cout << "Hello" << endl;
}