5 for (
int i = 0; i < v->
size(); i++) {
14 printf (
"%d", v->
get(i));
17 printf (
" (%d elements)\n", v->
size ());
20int main (
int argc,
char *argv[])
24 for (
int i = 1; i <= 10; i++) {
32 for (
int i = 0; i < 5; i++)
33 v.
set (2 + i, 31 + i);
38 for (
int i = 0; i < 5; i++)
39 v.
set (8 + i, 51 + i);
44 for (
int i = 0; i < 5; i++)
45 v.
set (10 + i, 531 + i);
50 for (
int i = 0; i < 5; i++)
51 v.
set (1 + i, 21 + i);
57 for (
int i = 0; i < 5; i++)
58 v.
set (n + i, 101 + i);
Container similar to lout::misc::SimpleVector, but some cases of insertion optimized (used for hyphen...
void set(int i, T t)
Store an object in the vector.
void insert(int index, int numInsert)
T get(int i) const
Return the one element, explicitly.
static void print(lout::misc::NotSoSimpleVector< int > *v)