pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More (Windows) Errors


From: Ingo Ruhnke
Subject: Re: More (Windows) Errors
Date: 19 Oct 2002 17:10:57 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

David Philippi <address@hidden> writes:

> Correcting myself - I'm not sure what the code above does, but I guess it's 
> something undefined.
> The correct code is:
> 
> vec.resize(vec.size + p.vec.size());
> std::copy(p.vec.rbegin(), p.vec.rend(), std::inserter(vec, vec.end()));

As far as I know that would also be incorrect, since vec.end() is the
resize()'ed end, and another try:

| vec.reserve(vec.size + p.vec.size());
| std::copy(p.vec.rbegin(), p.vec.rend(), std::back_inserter(vec));

-- 
WWW:      http://pingus.seul.org/~grumbel/ 
Games:    http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden 
ICQ:      59461927




reply via email to

[Prev in Thread] Current Thread [Next in Thread]