1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

set::insert()

Discussion in 'C++' started by vbx_wx, Sep 3, 2010.

  1. vbx_wx

    vbx_wx New Member

    Joined:
    Sep 3, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    How can i rewrite set::inser() function,using a vector::insert() :

    class Set {
    std::vector set;
    public:
    void insert(const T& t)
    {
    set.insert(set.end(), t);
    }
    I tried to insert them at the end,but it wont work corectly.
     

Share This Page