"colon" uses in C++ ???

Just as a Python learning exercise I am trying to translate "Writing Compilers and Interpreters", second edition, into Python 3. There's one use of the "colon" which I haven't seen in C++ texts. And it appears to make no sense to me. InChapter 2, Page 21, in "buffer.cpp" the constructor for the "TTextInBuffer" begins like this:


TTextInBuffer::TTextInBuffer(const char *pInputFieName, TAbortCode ac)
: pFileName(new char[strlen(pInputFileName) + 1])
{ code...code }


I thought this colon ( begins second line) was used to introduce a SuperClass but I certainly don't see how it pertains here. Help!!
The colon begins the constructor's initialization list.
Hey, thanks, I really appreciate it. I guess I had forgotton all about initialization lists years ago, as I never have used them.
Topic archived. No new replies allowed.