So, below is code for a binary tree, the structure is referred to as TreeNode. I'm having some trouble separating what information goes into the TreeNode.h file and the TreeNode.cpp file.
Here is the .h file
Code:
#pragma once
#ifndef TREENODE_H
#define TREENODE_H
#include <iostream>
#include <string>
class TreeNode{
private:
std::string word;
int count;
Will this compile? I have 1 header file , and it is included in 2 source files.
1. What about re-declaration error ? (for arraysize... )
2. #include always = textual substitution ??? Or does it have some intelligence ?
my header file - consts.h:
const int arraysize = 15;