Const use in C++

Summaried from The C++ const declaration, why and how.

const int myconstant = 10
An int which can't change value. Similar to #define in C but better.
const int * myconstant
Variable pointer to a constant integer.
int const * myconstant
Same as above.
int * const myconstant
Constant pointer to a variable integer.
int const * const myconstant
Constant pointer to a constant integer.
void mymethod(QString const & myparamater)
myparamater will not be altered by the method. & means it can be altered but here we just want it to be used because it saves taking a copy.
class myclass {
void mymethod() const;
int myvariable; }
mymethod() will not alter any member variable (myvariable), this means you can call the method from a const variable.
const int*const mymethod(const int*const&)const
It will return a pointer which is constant and points to a constant integer, the method doesn't alter either the variable pointed to by the paramater or the pointer itself and it doesn't alter any of the member variables of the object the method is it.