ultimatepp/tutorial/Ntl03/Ntl03.cpp
cxl 0e04c59abc cpp11 branch - committing the merge (rest of it)
git-svn-id: svn://ultimatepp.org/upp/trunk@7048 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2014-03-16 16:35:29 +00:00

23 lines
313 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
Vector<int> v;
v.Add(1);
v.Add(2);
DUMPC(v);
Vector<int> v1 = pick(v);
DUMPC(v1);
// DUMPC(v); -> v is picked, this would crash with runtime error
v = clone(v1);
DUMPC(v1);
DUMPC(v);
Vector<int> v2 = clone(v);
DUMPC(v2);
DUMPC(v);
}