we*********@gmail.com wrote:
I ran across a code written by somebody else. Since I am new to C++,
could you please explain what each of "const *" means in this code
snippet as well as the last "const"?
Tool const* const* tool_array() const;
Tool is an internal structure defined somewhere else. tool_array()
gets an entire array of Tool type.
The function 'tool_array' is a non-static member function of some
class. It returns a pointer to a constant pointer to a constant
object of type Tool (those are the two 'const' between 'Tool' and
the name of the function), and does not change the object for which
it is called (that's the 'const' after the [empty] argument list):
it can be called for a constant object.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask