CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Droopy

Search: Search took 0.04 seconds.

  1. Replies
    18
    Views
    4,627

    Re: Problems with iterators

    By the way, do any of you guys have a great link to where I can learn more about this: sprites.erase(remove_if(sprites.begin(), sprites.end(), hasCollided), sprites.end());? I get sprites.erase and...
  2. Replies
    18
    Views
    4,627

    Re: Problems with iterators

    I just solved it! Thanks Philip :)

    And also, thank you Paul McKenzie! You're seriously the coolest guy ever :)
  3. Replies
    18
    Views
    4,627

    Re: Problems with iterators

    I changed it to:



    if (innerHit)
    {
    sprites.erase(remove_if(sprites.begin(), sprites.end(), &Sname::Engine::hasCollided), sprites.end());
    }
  4. Replies
    18
    Views
    4,627

    Re: Problems with iterators

    Still not working. Now I get the following error: Error 1 error C3867: 'Sname::Engine::hasCollided': function call missing argument list; use '&Sname::Engine::hasCollided' to create a pointer to...
  5. Replies
    18
    Views
    4,627

    Re: Problems with iterators

    Thank you! :) For the record, i AM using Visual Studio 2013/C++11. What would you change knowing that?
  6. Replies
    18
    Views
    4,627

    Re: Problems with iterators

    And sorry for the lack of indentation.
  7. Replies
    18
    Views
    4,627

    Problems with iterators

    So I have this problem with not being able to iterate over a vector in a nestled for-loop. Here's the nestled for-loop:

    bool innerHit = false;
    for (std::vector<Sprite*>::iterator outerIter...
Results 1 to 7 of 7





Click Here to Expand Forum to Full Width

Featured