diff options
| author | Tyge <[email protected]> | 2020-04-19 15:02:36 +0200 |
|---|---|---|
| committer | Tyge <[email protected]> | 2020-04-19 15:02:36 +0200 |
| commit | 57815b8d1be5668a40254fd2b12fd1d6ecf9da37 (patch) | |
| tree | 357e99d8b30b43382a25050dfc8115ce17b64525 | |
| parent | 76c8cc6e95e630fab87941f4366a46fb6587d7f5 (diff) | |
| download | STC-modified-57815b8d1be5668a40254fd2b12fd1d6ecf9da37.tar.gz STC-modified-57815b8d1be5668a40254fd2b12fd1d6ecf9da37.zip | |
Updated change in API: cvector_push -> cvector_pushBack, cvector_pop -> cvector_popBack
| -rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -43,8 +43,8 @@ int main() { CVector_ix bignums = cvector_init; // or use cvector_ix_init; if initializing after declaration.
cvector_ix_reserve(&bignums, 100);
for (size_t i = 0; i<100; ++i)
- cvector_ix_push(&bignums, i * i * i);
- cvector_ix_pop(&bignums); // erase the last
+ cvector_ix_pushBack(&bignums, i * i * i);
+ cvector_ix_popBack(&bignums); // erase the last
uint64_t value;
for (size_t i = 0; i < cvector_size(bignums); ++i)
@@ -60,8 +60,8 @@ declare_CVector(cs, CString, cstring_destroy); // supply inline destructor of va int main() {
CVector_cs names = cvector_init;
- cvector_cs_push(&names, cstring_make("Mary"));
- cvector_cs_push(&names, cstring_make("Joe"));
+ cvector_cs_pushBack(&names, cstring_make("Mary"));
+ cvector_cs_pushBack(&names, cstring_make("Joe"));
cstring_assign(&names.data[1], cstring_make("Jake")); // replace Joe
printf("%s\n", names.data[1].str); // Access the string char*
|
