Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7042141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:07:56+00:00 2026-05-28T02:07:56+00:00

I am new to the usage of iterators. I have used the below code,

  • 0

I am new to the usage of iterators. I have used the below code, where I parse through all the elements in the list using iterator, to determine whether the element exists in the list or not.

list<int> pendingRsp;
list<int>::iterator it1;

for(int i = 1; i <= 5; i++)
   pendingRsp.push_back(i *10);

for(it1 = pendingRsp.begin(); it1 != pendingRsp.end(); it1++)
{
   if((*it1) == 50)
   {
      found = true;   
      break;
   }
}

The code works fine, but I am getting the below Lint warning:

Info 1702: operator ‘operator!=’ is both an ordinary function ‘operator!=(const pair<<1>,<2>> &, const pair<<1>,<2>> &)’ and a member function ‘list::const_iterator::operator!=(const const_iterator &) const’

What does the above warning mean? Is it conflict between operator overloading implementation of != operator in list and iterator?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:07:57+00:00Added an answer on May 28, 2026 at 2:07 am

    It means precisely what it says. The list iterator is a pair and pair has an operator!= function, but the list iterator class also has its own operator!= function. Since both operators do precisely the same thing (because any two pairs that match on the first element match on the second as well), you can safely ignore the warning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New programmer here, I am trying to understand and break down this code below
I'm new to htaccess usage... need help on the below Form http://mysite.com/index.php?page=login to http://mysite.com/login
What is the terminology for the usage of new in: list.Add(new{a=1, b=2}) And what
This is a code i found for Egit I am new to the usage
I have a snippet of code like this: std::list<boost::shared_ptr<Point> > left, right; // ...
I have a mailform that I use. In a new usage I have added
I have a million elements in a List to process. Dropping them crudely into
This question shows the usage of **var = new Object(); and that's something totally
I am new to rails. My rails version is 2.3.5. I found usage like:
new on ruby and using windows xp and rails 3, i want to send

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.