Hi guys,
I'm working on a project where I need to remove Qt libraries and use C++ STL.
I need to replace QPtrList::findRef defined in Qt with C++ STL alternative . But unable to get any solution.
For example
I have used STL's find(InputIterator first, InputIterator last, const T& value) to replace QPtrList::find. The code can be seen as below
Defined in Qt3
if( -1 == steps.find( s ) )
if( -1 == steps.find( s ) )
To copy to clipboard, switch view to plain text mode
Alternative in C++ STL
StepListIterator sIt = find( steps.begin(), steps.end(), s);
if (sIt == steps.end())
{
//not found perform relevant operation
}
StepListIterator sIt = find( steps.begin(), steps.end(), s);
if (sIt == steps.end())
{
//not found perform relevant operation
}
To copy to clipboard, switch view to plain text mode
Similar way I need to replace Qt's QPtrList::findRef with an C++ STL alternative.
Please help me
Waiting for your reply
Thankx in advance
Bookmarks