Browse Source

Expanded code example

master
Kenneth Bruen 3 years ago
parent
commit
c8bc3f270a
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 13
      README.md

13
README.md

@ -6,6 +6,19 @@ Why? Why not.
```cpp ```cpp
#include "dynarray.hpp" #include "dynarray.hpp"
// And then later in code
DynArray<int> arr;
arr << 5;
// Classic for:
for (int i = 0; i < arr.size(); i++) {
// Do stuff with arr[i]
}
// Range based for:
for (auto elem : arr) {
// Do stuff with elem
}
``` ```
## How to run example? ## How to run example?

Loading…
Cancel
Save