So I am working on a custom binary search tree class and as of now, my main function in my cpp file is only this:
#include "stdafx.h"
#include "BST.h"
using namespace std;
int main()
{
BST<string> tree;
return 0;
}
but I'm getting three 2065 errors, one for the term "BST" one for "String" and one for "tree". I've tried to include the string class as well, but that doesn't change anything. I've been trying to understand what's going on for a long time but I can't wrap my head around it. Here's some basic code from my header file:
#pragma once
#ifndef BST_H
#define BST_H
#include <stdexcept>
#include <iostream>
#include <string>
using namespace std;
template <typename T>
class BST
{
BST();
BST(T elements[], int arraySize);
BST(BST<T> &tree);
//insert code here
};
I won't include the entire header file here because it's 400 lines, but it's not anything special. I have including BST.h in the header files in the visual studio solution and everything in the solution should be working properly. There are no errors when I comment out the line where the BST is declared. Any help with this is super appreciated, as visual studio and all of it's nuances are so confusing to me. Thank you.