79715316

Date: 2025-07-25 23:42:17
Score: 2.5
Natty:
Report link

The `extern` keyword was made for this. This is explained well in [These StackOverflow Answers](When to use extern in C++). In short, `extern` tells the linker that the different modules need to reference the same underlying object.

I also needed to remove static readwrite permission, i.e.

```python

instance = Singleton.get_instance()

instance.test = 'New Value'

print(instance.test)

```

changes to

```python

Singleton.set_test_val('New Value')

print(Singleton.get_test_val())

```

Reasons:
  • Blacklisted phrase (1): StackOverflow
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Jordan