氧气警告
Doxygen warnings
当我尝试对我的 cpp 文件使用 doxygen 时,我的编译器发出了警告。见下文。我必须改变什么以适应吸氧剂?非常感谢您的帮助。
/home/user/cpplab4/list.cpp:33: 警告:未声明或定义记录的符号“CS150::list::list”。
/home/user/cpplab4/list.cpp:46: 警告:未声明或定义记录的符号“node * CS150::list::make_node”。
/****************************************************************/
/*!
* \class CS150
* \brief namespace
*
*/
/****************************************************************/
/**********************************************************************/
/*!
* \class CS150::list()
* \brief initialise the_list, constructor
*/
/**********************************************************************/
list::list()
{
the_list = nullptr;
list_size =0;
}
/**********************************************************************/
/*!
* \class CS150::node *list::make_node(int val)
* \brief Allocate memory and set members.
* \param val to be placed in new node
* \return return node
*/
/*********************************************************************/
node *list::make_node(int val)
{
node *pnode = new node;
pnode->value = val;
pnode->next = nullptr;
return pnode;
}
您的评论如下:
\class CS150
"There is a class called CS150
."
\class CS150::list()
"There is a class called CS150::list()
.".
\class CS150::node *list::make_node(int val)
"There is a class called CS150::node *list::make_node(int val)
".
None 这些说法是正确的,这确实让 Doxygen 感到困惑。看起来您正在尝试使用命令 \class
记录 一切 (包括命名空间?)。但是那个命令是为了 类.
我想你可能是想在第一个块中使用 \class list
(虽然这似乎没有任何作用),所有其他的都应该被删除:Doxygen 知道你在记录哪个函数以及什么它被称为。没有必要也没有办法告诉它。
因此,例如,只是:
/*!
* \brief Allocate memory and set members.
* \param val to be placed in new node
* \return return node
*/
node *list::make_node(int val)
{
node *pnode = new node;
pnode->value = val;
pnode->next = nullptr;
return pnode;
}
我建议您再次阅读 Doxygen 文档,了解如何最好地使用它。
当我尝试对我的 cpp 文件使用 doxygen 时,我的编译器发出了警告。见下文。我必须改变什么以适应吸氧剂?非常感谢您的帮助。
/home/user/cpplab4/list.cpp:33: 警告:未声明或定义记录的符号“CS150::list::list”。
/home/user/cpplab4/list.cpp:46: 警告:未声明或定义记录的符号“node * CS150::list::make_node”。
/****************************************************************/
/*!
* \class CS150
* \brief namespace
*
*/
/****************************************************************/
/**********************************************************************/
/*!
* \class CS150::list()
* \brief initialise the_list, constructor
*/
/**********************************************************************/
list::list()
{
the_list = nullptr;
list_size =0;
}
/**********************************************************************/
/*!
* \class CS150::node *list::make_node(int val)
* \brief Allocate memory and set members.
* \param val to be placed in new node
* \return return node
*/
/*********************************************************************/
node *list::make_node(int val)
{
node *pnode = new node;
pnode->value = val;
pnode->next = nullptr;
return pnode;
}
您的评论如下:
\class CS150
"There is a class called CS150
."
\class CS150::list()
"There is a class called CS150::list()
.".
\class CS150::node *list::make_node(int val)
"There is a class called CS150::node *list::make_node(int val)
".
None 这些说法是正确的,这确实让 Doxygen 感到困惑。看起来您正在尝试使用命令 \class
记录 一切 (包括命名空间?)。但是那个命令是为了 类.
我想你可能是想在第一个块中使用 \class list
(虽然这似乎没有任何作用),所有其他的都应该被删除:Doxygen 知道你在记录哪个函数以及什么它被称为。没有必要也没有办法告诉它。
因此,例如,只是:
/*!
* \brief Allocate memory and set members.
* \param val to be placed in new node
* \return return node
*/
node *list::make_node(int val)
{
node *pnode = new node;
pnode->value = val;
pnode->next = nullptr;
return pnode;
}
我建议您再次阅读 Doxygen 文档,了解如何最好地使用它。