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
...
Type: Posts; User: fallening
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
...
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(),...