C++ Code with Error and Warning messages:
class ClassName
{
private:
QString s;
double d;
public:
ClassKName(QString s="noName", double d=0.0) : s(s), d(d)
{
}
};
Solution:
The constructor name is different from the class name.
Rename the constructor name ClassKName to be the same with ClassName without the extra letter ‘K’.
No comments:
Post a Comment