问题描述:
c/c++里 函数名后面加冒号再加函数名 是神马意思?
Page_image::Page_image( const OCRAD_Pixmap & image,const bool invert )
:Rectangle( 0,0,image.width - 1,image.height - 1 )
{
data.resize( height() );
for( unsigned int row = 0; row < data.size(); ++row )
data[row].reserve( width() );
此处省略很多……
}
加了:Rectangle( 0,0,image.width - 1,image.height - 1 )后有什么效果.
我记得在类定义时这是继承.但是这么个用法看不懂.
还有个更变态的:
Page_image::Page_image( const Page_image & source,const int scale )
:Rectangle( source ),maxval_( source.maxval_ ),threshold_( source.threshold_ )
{
……
}
Page_image::Page_image( const OCRAD_Pixmap & image,const bool invert )
:Rectangle( 0,0,image.width - 1,image.height - 1 )
{
data.resize( height() );
for( unsigned int row = 0; row < data.size(); ++row )
data[row].reserve( width() );
此处省略很多……
}
加了:Rectangle( 0,0,image.width - 1,image.height - 1 )后有什么效果.
我记得在类定义时这是继承.但是这么个用法看不懂.
还有个更变态的:
Page_image::Page_image( const Page_image & source,const int scale )
:Rectangle( source ),maxval_( source.maxval_ ),threshold_( source.threshold_ )
{
……
}
问题解答:
我来补答展开全文阅读