I'm struggling with breaking up working code that exists in 2 files (A main.cpp and header.h -> A main.cpp, functions.cpp, and header.h)
My problem seems to completely revolve around this struct and my use of the *root pointer:
struct avl_node
{
int data;
struct avl_node* left;
struct avl_node* right;
}*root;
When my code is in just two files (the main.cpp and header.h) the code runs fine, it's the moment I split the definitions of my functions into a functions.cpp that the LNK1169 error starts to appear.
Am I misunderstanding how things should work?