Hey everyone,
I just started writing this program when I hit a problem with the destructor. Me and my buddies in the lab could not figure out what is going on. The error said something about symbol referencing error and refers to the destructor. The program is set in three files as a driver, header, and implementation.
// Main File
#include <iostream>
#include "tree.h"
using namespace std;
main ()
{
fktree directory_tree;
directory_tree.build_tree();
}
// Header file
#ifndef TREE_H
#include <string.h>
#include <iostream>
using namespace std;
struct node
{
string info;
int size;
node * firstkid
node * nextbro
};
class fktree
{
public:
fktree();
~fktree();
void build_tree();
private:
node *root, *curr_pos;
};
#define TREE_H
#endif
// Implementation File
#include <string.h>
#include <iostream>
#include "tree.h"
using namespace std;
fktree::fktree()
{
root = new node;
root->info = "/";
root->size = 1;
root->firstkid = NULL;
root ->nextbro = NULL;
}
void fktree::build_tree()
{
}