Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/125.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 代码中:运算符的含义_C++_Function_Class_C++11 - Fatal编程技术网

C++ 代码中:运算符的含义

C++ 代码中:运算符的含义,c++,function,class,c++11,C++,Function,Class,C++11,我正在努力理解线性对撞机I/O项目的一些代码。 我是C++新手,我不能理解下面的代码在我下面复制的代码中的含义。p> 顶点::顶点():处理器(“顶点”),_输出(0) 在上面的代码行中:是什么意思? 提前感谢大家 代码写在下面 #include <marlin/Global.h> #include "lcio.h" //more .h files that I have not shown here using namespace lcio ; using namespace m

我正在努力理解线性对撞机I/O项目的一些代码。 我是C++新手,我不能理解下面的代码在我下面复制的代码中的含义。p> 顶点::顶点():处理器(“顶点”),_输出(0)

在上面的代码行中:是什么意思? 提前感谢大家

代码写在下面

#include <marlin/Global.h>
#include "lcio.h"
//more .h files that I have not shown here

using namespace lcio ;
using namespace marlin ;

using namespace std;

vertex avertex ;

 vertex::vertex():Processor("vertex"),_output(0)
{
    _description = "Measure Bush Quantities" ;

std::vector<std::string> branchCollections;
branchCollections.push_back(std::string("Branch_ECALEndcap"));
branchCollections.push_back(std::string("Branch_HCALEndcap"));
registerProcessorParameter("branchCollections" ,                      "Name of Branch Collections" ,_branchCollections,branchCollections);



_treeFileName="vertex.root";
registerProcessorParameter( "TreeOutputFile" , 
        "The name of the file to which the ROOT tree will be written" ,
        _treeFileName ,
        _treeFileName);


}

void vertex::init() {
 //not important

}


void vertex::processEvent( LCEvent * evtP ) 
{       

    //not important

}
#包括
#包括“lcio.h”
//这里没有显示更多的.h文件
使用名称空间lcio;
使用马林鱼;
使用名称空间std;
顶点回避;
顶点::顶点():处理器(“顶点”),_输出(0)
{
_description=“测量衬套数量”;
std::向量分支集合;
branchCollections.push_back(std::string(“Branch_ECALEndcap”);
branchCollections.push_-back(std::string(“Branch_-HCALEndcap”);
registerProcessorParameter(“branchCollections”、“branchCollections的名称”、“branchCollections、branchCollections”);
_treeFileName=“vertex.root”;
registerProcessorParameter(“TreeOutputFile”,
“根目录树将写入的文件的名称”,
_树名,
_树名);
}
void vertex::init(){
//不重要
}
void vertex::processEvent(LCEvent*evtP)
{       
//不重要
}

它是的开头。

是的,而
标记了的开头。

以下代码

vertex::vertex():Processor("vertex"),_output(0)
是顶点类的构造函数的定义。在列之后,您将获得基类(在本例中为Processor)的构造函数,然后是数据成员(output)。然后用大括号表示实际的constructor函数体