I ve a class like
class mycls
{
int rank;
};
class mycls
{
QString name;
int rank;
QString type;
};
To copy to clipboard, switch view to plain text mode
in a function
{
mycls *ptr->rank; //Fiiling rank throuu defined set methods of class
ptr->type, ;
ptr->name;
//craete a vector
QVector(mycls
*) vtr
= value from member function;
if (vtr != NULL && !vtr->contains(ptr))
{
vtr->append(ptr);
}
}
Fillvalue(int rank, QString type, QString name)
{
mycls *ptr->rank; //Fiiling rank throuu defined set methods of class
ptr->type, ;
ptr->name;
//craete a vector
QVector(mycls *) vtr = value from member function;
if (vtr != NULL && !vtr->contains(ptr))
{
vtr->append(ptr);
}
}
To copy to clipboard, switch view to plain text mode
I need to append only the values which are not their in side vector. that means no element should have same name and rank in the QVector.
But above method is not working fine. Can any bpdy help me??
Thanks
Bookmarks