Yes, this line is our problem:
static parser Parser;
You get a local instance in each file where you include Parser.h. But you should have only one global instance.
Yes, this line is our problem:
static parser Parser;
You get a local instance in each file where you include Parser.h. But you should have only one global instance.