History

moving examples to top dir

Ge Wang committed 9 years ago

Commit 35ca2f61 parent fd011ef486 files · +-44 −-44Browse files

Showing the changes to examples/array/array_dynamic.ck (1 of 486 files). Show all

Unified · Split

examples/array/array_dynamic.ck+20−0
@@ -0,0 +1,20 @@
1+// instantiate int array
2+float argh[0];
3+
4+// print out relevant info
5+<<< "array size:", argh.size() >>>;
6+
7+// append items (array should grow dynamically as needed)
8+argh << 3.0 << 4 << 5;
9+
10+// print out relevant info
11+<<< "array size:", argh.size() >>>;
12+
13+// print out elements
14+<<< "contents:", argh[0], argh[1], argh[2] >>>;
15+
16+// pop element
17+argh.popBack();
18+
19+// print out relevant info
20+<<< "array size:", argh.size() >>>;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t