Self-reference class

CurrentJar->Puzzle = ;

In this line, CurrentJar->Puzzle is a type AMyJarPuzzle, and I am in MyJarPuzzle.cpp. I want to reference the class I’m in so that CurrentJar has access to everything from AMyJarPuzzle. Any thoughts?

I assume you mean object

CurrentJar->Puzzle = this;

“this” is a pointer to object that code is currently executed in.

hey good to see you again.

That doesnt seem to work as I get this error:

87619-equal.png

Any ideas?

You need to declare AMyJarPuzzle* Puzzle in CurrentJar class for that operator to work and passing around pointers. Pointer is just integer…