mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
changed svn layout
git-svn-id: svn://ultimatepp.org/upp/trunk@281 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
commit
263ff5f895
2665 changed files with 642923 additions and 0 deletions
26
tutorial/Ntl02/Ntl02.cpp
Normal file
26
tutorial/Ntl02/Ntl02.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
int RandomValue()
|
||||
{
|
||||
return rand() % 10;
|
||||
}
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
Vector<int> v;
|
||||
v.Add(1);
|
||||
v.Add(2);
|
||||
|
||||
v.Insert(1, 10);
|
||||
DUMPC(v);
|
||||
v.Remove(0);
|
||||
DUMPC(v);
|
||||
v.Clear();
|
||||
for(int i = 0; i < 10000; i++)
|
||||
v.At(RandomValue(), 0)++;
|
||||
DUMPC(v);
|
||||
Sort(v);
|
||||
DUMPC(v);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue