Foo.h
#ifndef Foo_h#define Foo_hstatic int bar = 10;void modifyBar();#endif
Foo.cpp
#include "Foo.h"void modifyBar() { bar = 20;}
When I print out bar after calling modifyBar(), I get a value of 10, expecting to get 20. I did a bit of testing and I'm thinking it has something to do with splitting up the code into 2 separate files?