What should I know about having two separate classes in one .h file?
I have a binary search tree class with all the members and public & private functions.
class BinarySearchTree
{
struct Node {
Node* left;
Node* right;
int val;
};
};
and following that code I want to design a stack of pointers to that binary search tree node. Within the same.h file I have
class stack
{
Node* array;
//
};
Visual Studio doesn't show linkage and doesn't recognize Node*. Is it ok to declare two separate classes in one .h file or is it better to implement the stack class nested inside the binary search tree class?