CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 22

Threaded View

  1. #6
    Join Date
    Apr 1999
    Posts
    27,449

    Re: adding to vector of vector<int>, check if element already present

    What is "path_count"? Where does it come from? Also, why do you need to keep a count? Why are you not iterating over a range instead of trying to "hand_count" using path_count?

    In other words:
    Code:
    for_each(new_set_of_paths.begin(), 
                   new_set_of_paths.end(), whatever);
    The "whatever" can be ironed out later, but is this what your major loop (which you didn't show us) consist of?

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; December 6th, 2011 at 06:29 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured