Re: reduce c++ vector size

Discussion in 'C++' started by Fraser Ross, Jun 4, 2012.

  1. Fraser Ross

    Fraser Ross Guest

    vector<A> a;

    fill a.

    vector<A>(a).swap(a); I have taken this from a well known book.

    Fraser.
    Fraser Ross, Jun 4, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    1,890
    Csaba
    Feb 18, 2006
  2. Alain Ketterlin

    Re: reduce c++ vector size

    Alain Ketterlin, Jun 3, 2012, in forum: C++
    Replies:
    0
    Views:
    321
    Alain Ketterlin
    Jun 3, 2012
  3. Rui Maciel

    Re: reduce c++ vector size

    Rui Maciel, Jun 3, 2012, in forum: C++
    Replies:
    10
    Views:
    607
    Juha Nieminen
    Jun 5, 2012
  4. Ian Collins

    Re: reduce c++ vector size

    Ian Collins, Jun 4, 2012, in forum: C++
    Replies:
    0
    Views:
    333
    Ian Collins
    Jun 4, 2012
  5. Replies:
    2
    Views:
    76
    Öö Tiib
    Mar 10, 2014
Loading...

Share This Page