ultimatepp/tutorial/Ntl01/Ntl01.cpp
cxl ce9cb2caff .docs
git-svn-id: svn://ultimatepp.org/upp/trunk@9862 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-05-22 06:56:59 +00:00

19 lines
326 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
Vector<int> v;
v.Add(1);
v.Add(2);
v.Add(3);
for(int i = 0; i < v.GetCount(); i++)
LOG(v[i]);
LOG("..and now iterators..");
for(auto q = v.begin(), e = v.end(); q != e; q++)
LOG(*q);
LOG("..and now range-for..");
for(const auto& q : v)
LOG(q);
}