C++ Plugin development beginner question


I am learning C++ plugin development.
I have successfully build template file and going through other exercises.

I am following this tutorial:

Where does &m_nVal variable is defined?

Screenshot attached

It is a member variable of the command class (member variables get m_ prepended to their name). You probably need to scroll up to see it, or go to the class’ header file (if there is one).

The variable that is declared in the tutorial and is not declared in the template project file.

I am just re-writing this tutorial in cmdTest20.cpp (template project from mcneel) and it has no header file.

Where should I declare it correctly? As there is no variable like this in the whole project.

In the CRhinoCommand::result CCommandTest20::RunCommand(const CRhinoCommandContext& context)
or somewhere else as a global parameter?

Should I declare them there ?

Looks good to me