Re: copy a list in 1 instruction
- From: "Stephen Howe" <sjhoweATdialDOTpipexDOTcom>
- Date: Wed, 13 Apr 2005 00:57:44 +0100
> if we have 2 variables l1 and l2, both of type
> std::list<SContactProperty>, can
> one then do simply:
> l1=l2;
If you have constructed l1 and/or l2 in one executable (EXE/DLL) and the
assignment is taking place in another executable (EXE/DLL) then that can
screw things up if you have done static linking with LIBs for 1+
executable(s).
You need to link with the same RTL in DLL form for both executables or make
sure that any effective allocation/deallocation occurs in one executable
type only.
The other alternative is that you have corrupted the heap/stack. When this
occurs, the program may continue "normally" and may take some while before
the damage shows up. The point where the damage show ups may be innocent and
you need to look at the validity of previous executable statements (and
sometimes a long way back).
Stephen Howe
.
- Follow-Ups:
- Re: copy a list in 1 instruction
- From: Jürgen Devlieghere
- Re: copy a list in 1 instruction
- References:
- copy a list in 1 instruction
- From: Jürgen Devlieghere
- copy a list in 1 instruction
- Prev by Date: Re: Why use STL?
- Next by Date: Re: Why use STL?
- Previous by thread: Re: copy a list in 1 instruction
- Next by thread: Re: copy a list in 1 instruction
- Index(es):
Relevant Pages
|