Search:

Type: Posts; User: fallening

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,552

    I am afraid this kind of linklist is a potential...

    I am afraid this kind of linklist is a potential source of memory leaks


    list<TreeNode*> children;

    I prefer a smart pointer rather than a naked one in this case, i.e

    ...
  2. Replies
    7
    Views
    9,693

    How about this? void do_insertion(...

    How about this?



    void do_insertion( vector<string>& v, const string& s, const unsigned int pos )
    {
    vector<string> buff;
    buffer.reserve( v.size()+1 );
    copy( v.begin(),...
Results 1 to 2 of 2