Stupid problem with boost::share_ptr

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roman Werpachowski

    #1

    Stupid problem with boost::share_ptr

    Is there something wrong with this code?

    #include <boost/shared_ptr.hpp>

    int main()
    {
    boost::shared_p tr<double> g(new double);
    boost::shared_p tr<double> f(new double);

    f = boost::shared_p tr<double>(g.ge t());

    return 0;
    }

    I get a run-time memory error when I compile it with gcc. Did I do
    something wrong?

  • Roman Werpachowski

    #2
    Re: Stupid problem with boost::share_pt r

    On the 8 Jan 2006 15:37:51 -0800, Roman Werpachowski wrote:[color=blue]
    > Is there something wrong with this code?[/color]

    Sorry for posting thrice. It seems google is nuts lately.


    --
    Roman Werpachowski
    /--------==============--------\
    | http://www.cft.edu.pl/~roman |
    \--------==============--------/

    Comment

    Working...