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 9183825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:53:56+00:00 2026-06-17T18:53:56+00:00

the issue is I want to initialize a multiset iterator to some value, to

  • 0

the issue is I want to initialize a multiset iterator to some value, to be able to check later if there was some successful assignment to my iterator or not. Now without this initialization in some cycle of my program I get there some trash and all crashes.
In pseudocode I’d think about it like that:

multiset<whateverclassA,whateverclassB>::const_iterator init_me = NULL;
...//if succesfull, something is assigned to init_me iterator
if (init_me != NULL)
//do something

however it is not a usual pointer, so simple NULL doesn’t suffice probably.
Any help appreciated!

  • 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-06-17T18:53:57+00:00Added an answer on June 17, 2026 at 6:53 pm

    Use std::multiset::end. This is also the value that will be returned by algorithms like std::multiset::find if the value could not be found:

    multiset<whateverclassA,whateverclassB>::const_iterator 
        init_me = your_multiset.end();
    
    /* ... */
    
    if (init_me != your_multiset.end())
        //do something
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some confusion. Not really a bug or issue I am facing. I
I'm having the following issue - I want to traverse all the xml files
I want to issue multiple mysql commands with one mysql_query function. This is my
I want to issue a series of Command executions, but only when the prior
I want to solve this issue in query @ for Ex : id ip
I want to workaround the Webpage has expired issue. First, I just changed a
The issue I have is that I want to parse strings in order, so
Issue In the below code , say if i want to change the color
I am having an issue in iphone when i want to use a custom
After a merge I want to use git mergetool to resolve the issue but

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.