QQ wrote:
Hello, I am new on C++, I am reading one source code
ZThread::ZThread(char *threadname):bug("ZThread")
~~~~~~~~~~~~~~~~~~~What does it mean?
Which C++ book are you reading that doesn't explain initializer lists? This
is a very basic concept of C++.
The above means that 'bug' is either the name of a base class of ZThread or
the name of one of its data members. In the former case, the base part of
your object is initialized using its constructor that takes a const char*.
In the latter, the data member is initialized with such a constructor.
Without the initializer, the default constructor would be used.