Boost logo

Boost Users :

From: pegacorn_at_[hidden]
Date: 2006-02-25 05:44:06


How should I do to replace the constant pointer with shared_ptr?

int main()
{
    const int *ip = new int(1);
    *ip = 2; // NG
    ip = new int(2); // OK
}

How should I do to achieve the above-mentioned example
by using shared_ptr?

----
pegacorn

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net