【发布时间】:2011-06-10 00:19:57
【问题描述】:
可能重复:
What is this weird colon-member syntax in the constructor?
我在 Qt 应用程序的构造函数中到处都能看到它,但我不知道它叫什么。我正在尝试查找有关它的文档。
Browser::Browser(QTextBrowser& textBrowser, QObject* parent /*= 0*/)
: // <- What
m_textBrowser(textBrowser), // <- is
QObject(parent) // <- this stuff?
{
}
我为我的新手道歉。
【问题讨论】:
-
买一本好的 C++ 书,你可能会立刻明白。
标签: c++ constructor