In your function Object() { [native code] }, Node(Game(),v); does not work as expected.
It simply creates a temporary without actually using it, and has no effect.
When control passes over the ;, it immediately destroys the temporary.
Initializing the members in each function Object() { [native code] } is the correct way to go.
You could put their shared code in a private init() member function and call it from each function Object() { [native code] }, as shown below:
class Foo {
public:
...READ MORE
Jun 21, 2022
in C++
by
Damon
• 4,960 points
•
379 views