1. In C++ when your method doesn't have a parameter list you don't have to write
in place of the parameter list. In plain C you had to do this because there a function without any parameters is a vararg function if you don't put the
there but in C++ its just noise, an empty parameter list in C++ isn't vararg!
2. In C++ its better to keep all member variables private and make public or private set/get methods for them like this:
bool IsChecked() const
void SetChecked(bool checked)
Checked = checked;
Another good practice is to give noun member variable names and verb method names like SetXXX(), GetXXX(), DoThis(), DoThat(), the only exception are some bool getter methods that start with "Is" like in my example.
3. If you need the Checked variable in every instances then you are already OK, if you need this Checked variable only onece in your application then you can make it static and you can do it like this:
static bool IsChecked();
static void SetChecked(bool checked);
static bool g_Checked = false;
void Jointdetails::SetChecked(bool checked)
g_Checked = checked;
This way you can call
anywhere in you application.