Qiieha
24th April 2013, 10:17
Hi,
a trivial Question to you:
What's better style:
this
class Test{
private:
QString one;
QString two;
public:
Text(const QString& one,const QString& two);
}
//cpp
Test::Test(const QString& one,const QString& two) :
one(one),
two(two)
{
}
or that:
class Test{
private:
QString one;
QString two;
public:
Text(QString one, QString two);
}
//cpp
Test::Test(QString one,QString two) :
one(one),
two(two)
{
}
and what's are the advantages and disatvantages?
I prefer the first option, because it looks like more performance.. Am I right?
thanks ;)
a trivial Question to you:
What's better style:
this
class Test{
private:
QString one;
QString two;
public:
Text(const QString& one,const QString& two);
}
//cpp
Test::Test(const QString& one,const QString& two) :
one(one),
two(two)
{
}
or that:
class Test{
private:
QString one;
QString two;
public:
Text(QString one, QString two);
}
//cpp
Test::Test(QString one,QString two) :
one(one),
two(two)
{
}
and what's are the advantages and disatvantages?
I prefer the first option, because it looks like more performance.. Am I right?
thanks ;)