Why qBinaryFind is giving compilation errors for std::list?
Please go through the following examples?
for example following program does not compile.
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
std::list<int> sl;
int num ;
for ( int i = 0 ; i < 20 ; i ++ )
{
sl.push_back ( i ) ;
}
std::cout <<“Enter the integer :: “ ;
std::cin >> num ;
std::list<int>::const_iterator slItr = qBinaryFind ( sl , num );
if ( slItr != sl.end () )
std::cout <<“Num “ << *slItr << “ found “ << std::endl;
else
std::cout <<“Num “ << num << “ not found “ << std::endl;
return a.exec();
}
http://www.boostprogramming.com/forum/index.php/topic,748.0.html
↧