Search:

Type: Posts; User: Jack_learn_cpp

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,402

    Thanks anon , Thanks CornedBee, I have got...

    Thanks anon , Thanks CornedBee,

    I have got more clearity now.

    I am trying now the dangerous part,


    std::vector<A*> ptr_vec;
    A a; //local instance
    ptr_vec.push_back(&a); //store address
  2. Replies
    8
    Views
    1,402

    Thanks for the code snippet. This cleared my...

    Thanks for the code snippet. This cleared my confusion.

    By stepping out, I mean, to see where copy is made by the vector. Here is were object is made, and this leads to invoke copy contructor of...
  3. Replies
    8
    Views
    1,402

    Thanks anon. If vector makes a copy to what it...

    Thanks anon.

    If vector makes a copy to what it points to, then it must be calling its contructor. Then I must be able to walk through its contructor (by putting a break point in the contructor of...
  4. Replies
    8
    Views
    1,402

    How vector manages space

    Hi All,

    Please look at the code below.

    In set() fucntion, I am building a vector test_values. In this, I am pushing local block values. Which goes out of scope when function exits.

    When...
Results 1 to 4 of 4