Cnoeud( Cnoeud & ) not a regular signature for a copy constructor, although it is sometimes used to "transfer ownership" when copying, i.e. it moves something from the origin to a new object. This is usually used to get around problems that the object is about to "clean up" after use, when you do not want to use reference counting pointers.
With C ++ 0x there will be semantics of moving with r-values, where you can do Cnoeud( Cnoeud && ) to "move" an object that is not copied, but can be returned from a function.
It is unsafe to use objects with transfer-ownership semantics (e.g. auto_ptr) in collections such as a vector. You are lucky in a sense that you are caught in a compiler error, because it relieved you of pain during the execution of the error - it is much more difficult to find the problem.
If you want to create the correct constructor copy, then pass the parameter as a reference to the constant (as others have suggested).
By the way, in your "copy constructor" it turns out that
oNOEfils.clear(); vector<Cnoeud>::iterator it; for(it=oNOE.NOEAfficherfils().begin();it!=oNOE.NOEAfficherfils().end();it++) { oNOEfils.push_back(*it); }
easy to replace with
oNOEfils = oNOE.NOEAfficherfils();
More efficient recording (single line) and almost certainly more efficient to run.
source share